Class: RecordCollection::Name

Inherits:
ActiveModel::Name
  • Object
show all
Defined in:
lib/record_collection/name.rb

Instance Method Summary collapse

Instance Method Details

#humanObject



15
16
17
# File 'lib/record_collection/name.rb', line 15

def human
  I18n.t("#{@klass.record_class.i18n_scope}.collections.#{@klass.record_class.model_name.i18n_key}", default: 'Collection')
end

#param_keyObject



3
4
5
# File 'lib/record_collection/name.rb', line 3

def param_key
  'collection'
end

#route_keyObject



11
12
13
# File 'lib/record_collection/name.rb', line 11

def route_key
  @klass.record_class.model_name.route_key
end

#singular_route_keyObject



7
8
9
# File 'lib/record_collection/name.rb', line 7

def singular_route_key
  @klass.record_class.model_name.singular_route_key
end