Module: CurationConcerns::Naming::ClassMethods
- Defined in:
- app/models/concerns/curation_concerns/naming.rb
Instance Method Summary collapse
-
#model_name ⇒ Object
Override of ActiveModel::Model name that allows us to use our custom name class.
Instance Method Details
#model_name ⇒ Object
Override of ActiveModel::Model name that allows us to use our custom name class
7 8 9 10 11 12 13 14 |
# File 'app/models/concerns/curation_concerns/naming.rb', line 7 def model_name @_model_name ||= begin namespace = parents.detect do |n| n.respond_to?(:use_relative_model_naming?) && n.use_relative_model_naming? end CurationConcerns::Name.new(self, namespace) end end |