Module: ActiveEvent::Command::ClassMethods
- Defined in:
- lib/active_event/command.rb
Instance Method Summary collapse
Instance Method Details
#form_name(name) ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/active_event/command.rb', line 23 def form_name(name) define_singleton_method(:model_name) do @_model_name ||= begin namespace = parents.find do |n| n.respond_to?(:use_relative_model_naming?) && n.use_relative_model_naming? end ActiveModel::Name.new(self, namespace, name) end end end |