Flowdock
method

state_machine

Importance_0
v2.3.8 - Show latest stable - 0 notes - Class: ActiveModel::StateMachine::ClassMethods
state_machine(name = nil, options = {}, &block) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/state_machine.rb, line 25
      def state_machine(name = nil, options = {}, &block)
        if name.is_a?(Hash)
          options = name
          name    = nil
        end
        name ||= :default
        state_machines[name] ||= Machine.new(self, name)
        block ? state_machines[name].update(options, &block) : state_machines[name]
      end
Register or log in to add new notes.