The way it is now written there shouldn't be any difference between
using aasm with AR and any other Ruby class.
Here's very basic example from our User model:
class User < ActiveRecord::Base
include AASM
aasm_column :state # I guess it's the only AR specific method here
aasm_initial_state :created
aasm_state :created
aasm_state :pending, :enter => :send_activation_emai
...
aasm_event :register do
transitions :to => :registered, :from => :activated
end
...
end
On 25 Lut, 20:11, John Small <[email protected]> wrote:
> Rick wrote:
> > Check out the README.textile.
>
> > On Feb 25, 8:35 am, John Small <[email protected]>
>
> I checked out the README.textile for restful_authentication, which
> doesn't really say anything about aasm. The generator just generates
> code for the old aasm, which doesn't work with the new one.
>
> To save time I've just gone back to the old aasm plugin and it's now
> running OK.
>
> If anyone does have a clear set of instructions on how to set up the new
> aasm to work with AR I'd love to hear about it.
>
> A clear set of instructions means "instead of writing
> acts_as_state_machine you should write ..." and "instead of event use
> ..." it doesn't mean, "I heard of someone who might have written a blog
> article where he mentioned it in passing"
>
> Ta
>
> John Small
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---