module Merb
  module Locomotive
    module AdministrationDashboardHelper

      # returns a humanized count string for an ActiveRecord model object
      # like "2 beers", "1 user" or "no life"
      def count_objects(type)
        counter = (type.count == 0 ? "no" : type.count.to_s)
        return (counter + " " + type.name) # FIXME: reinstate inflections .inflected
      end

    end
  end
end

module Merb
  module Locomotive
    module AdministrationDashboardHelper

      # returns a humanized count string for a DataObjects model object
      # like "2 beers", "1 user" or "no life"
      def count_objects(type)
        count = type.count
        counter = (count == 0 ? "no" : count.to_s)
        type_name = Extlib::Inflection.demodulize(type.name)
        return (counter + " " + (count < 1 || count > 1 ? type_name.pluralize : type_name))
      end

    end
  end
end

Fix inflection of model names on administration dashboard page
Fix inflection of model names on administration dashboard page

Signed-off-by: Alex Coles <60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcolesportfolio.com>
