Sha256: 0ab242f660e0b2625beb19e41563d4b3bbc611f5f5dcc560032f8662f256be58

Contents?: true

Size: 259 Bytes

Versions: 20

Compression:

Stored size: 259 Bytes

Contents

module ActiveModel
  Name.class_eval do
    def human(options={})
      human_name = @klass.humanize_class_name

      if count = options[:count]
        n_(human_name, human_name.pluralize, count)
      else
        _(human_name)
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
gettext_i18n_rails-1.13.0 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.12.0 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.11.0 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.10.1 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.10.0 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.9.0 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.8.1 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.8.0 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.7.2 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.7.1 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.7.0 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.6.0 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.5.0 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.4.0 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.3.2 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.3.1 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.3.0 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.2.3 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.2.2 lib/gettext_i18n_rails/active_model/name.rb
gettext_i18n_rails-1.2.1 lib/gettext_i18n_rails/active_model/name.rb