From 76484b39c5cc1d70d6abc660576f562c24fa23aa Mon Sep 17 00:00:00 2001 From: Daniel Lo Date: Thu, 20 Mar 2014 10:20:27 -0700 Subject: [PATCH] Updated README.md to refect actual code necessary to get states Code listing for Inspection did not reflect the code necessary to produce the output that was indicated. job.aasm.states produces an array of AASM::State objects, which need mapping to produce the symbols necessary. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 414d0a8..fa30f86 100644 --- a/README.md +++ b/README.md @@ -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