Class: RecordCollection::Name
- Inherits:
-
ActiveModel::Name
- Object
- ActiveModel::Name
- RecordCollection::Name
- Defined in:
- lib/record_collection/name.rb
Instance Method Summary collapse
Instance Method Details
#human ⇒ Object
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_key ⇒ Object
3 4 5 |
# File 'lib/record_collection/name.rb', line 3 def param_key 'collection' end |
#route_key ⇒ Object
11 12 13 |
# File 'lib/record_collection/name.rb', line 11 def route_key @klass.record_class.model_name.route_key end |
#singular_route_key ⇒ Object
7 8 9 |
# File 'lib/record_collection/name.rb', line 7 def singular_route_key @klass.record_class.model_name.singular_route_key end |