This project is archived and is in readonly mode.

#1147 ✓wontfix
eagle.anton (at gmail)

bug in ActiveModel::StateMachine current state dynamic method with machine name is set

Reported by eagle.anton (at gmail) | October 1st, 2008 @ 07:05 AM | in 2.x

When we set name to state machine, dynamic method of current state falls.

Example:

class Example

include ActiveModel::StateMachine

state_machine :example do

state :new state :changed

event :change do

transitions :from => :new, :to => :changed

end

end end

p = Example.new

p.change!

p.current_state(:example) # => :changed

p.changed? # => :new

Why markup does not undesrtand new line ?

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Pages