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