1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00

Merge pull request #115 from danlo/master

Updated README.md to refect actual code necessary to get states
This commit is contained in:
Thorsten Böttger 2014-03-20 21:17:22 +01:00
commit 3da4549aaa

View file

@ -431,13 +431,13 @@ Given the `Job` class from above:
```ruby
job = Job.new
job.aasm.states
job.aasm.states.map { | state | state.name }
=> [:sleeping, :running, :cleaning]
job.aasm.states(:permissible => true)
job.aasm.states(:permissible => true).map { | state | state.name }
=> [:running]
job.run
job.aasm.states(:permissible => true)
job.aasm.states(:permissible => true).map { | state | state.name }
=> [:cleaning, :sleeping]
job.aasm.events