lib/mutator/helpers.rb in mutator-0.0.1 vs lib/mutator/helpers.rb in mutator-0.0.2

- old
+ new

@@ -3,19 +3,19 @@ def machine @machine ||= machine_class.new(self) end def self.included(base) - "Machines::#{base.name}".constantize.states.each do |state| + "Mutator::#{base.name}".constantize.states.each do |state| base.send(:define_singleton_method, state) do self.where(state: state) end end end protected def machine_class - "Machines::#{self.class.name}".constantize + "Mutator::#{self.class.name}".constantize end end end