I went to get the latest acts_as_state_machine from http://github.com/rubyist/aasm/tree/master and to my untrained eye it appears not to work anymore. At least it doesn''t work the same way that the old acts_as_state_machine worked and there''s no explanation for getting the new stuff running in an AR. Does anyone know what''s going on here? Should I just copy an old version and use that while they sort out the new version? Ta John Small -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
John Small wrote:> I went to get the latest acts_as_state_machine from > http://github.com/rubyist/aasm/tree/master and to my untrained eye it > appears not to work anymore. At least it doesn''t work the same way that > the old acts_as_state_machine worked and there''s no explanation for > getting the new stuff running in an AR. > > Does anyone know what''s going on here? Should I just copy an old version > and use that while they sort out the new version? > > Ta > > John SmallIt morphed into aasm: http://github.com/rubyist/aasm/tree/master -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> It morphed into aasm: > http://github.com/rubyist/aasm/tree/masterYes I know that, because that''s where I got the gem from. What I need to know is how to get the thing working with AR because the extremely slim example given in the readme just plain does not work. Does anyone know the ins and outs of getting the new aasm working with AR? Ta John Small -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I use aasm with restful-authentication which gem has some info on getting aasm to work. I''m not sure if rest-auth''s info is redundant with other gems but it works for me. I''ve used it with Ruby 1.8.[67] and 1.9.1 and Rails 2.[12].2 and 2.3.0. Check out the README.textile. On Feb 25, 8:35 am, John Small <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > It morphed into aasm: > >http://github.com/rubyist/aasm/tree/master > > Yes I know that, because that''s where I got the gem from. > > What I need to know is how to get the thing working with AR because the > extremely slim example given in the readme just plain does not work. > > Does anyone know the ins and outs of getting the new aasm working with > AR? > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rick wrote:> Check out the README.textile. > > On Feb 25, 8:35�am, John Small <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>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 via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Rick wrote: > > Check out the README.textile. > > > On Feb 25, 8:35 am, John Small <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> aasm_column :state # I guess it''s the only AR specific method hereAh! The vital bit of information which is always left out of the instructions. It works now that I''ve put that line in. Thanks. It seems to be part of the culture to always leave out a key bit of information required to get things to work so that people who haven''t written the code have to scrabble around in news groups and blogs to find the secret. Thanks John Small -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
John Small wrote:> >> It morphed into aasm: >> http://github.com/rubyist/aasm/tree/master > Yes I know that, because that''s where I got the gem from.Oops! Sorry John I didn''t look closely enough at your post. I thought you were trying to use the old acts_as_state_machine plugin. I''m glad to see you got it going though. -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---