Well, I am not sure if this is the best way to go, but I accomplished
this by doing:
def before_update_save(post)
if post.status_changed?
# store the current status method
status = post.status
# reset the status back to what it was
post.status = post.status_was
# call the state_machine method on the post
post.send(status)
end
end
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en.