Fernando Perez wrote:
>> I guess it has something to do with acts_as_state_machine?
> 
> Yes. Don't you read the source code of your plugins before using them? 
> That's bold.

OK, I read some of the source code of the plugin. Sadly I'm no very 
experienced Ruby programmer, so I have a question.

Where does a new record get saved to the DB when calling register!?

>> record = User.new({ :login => 'quire', :email => 'qu...@example.com', 
>> :password => 'quire', :password_confirmation => 'quire' })
=> #<User id: nil, first_name: nil, last_name: nil, login: "quire", 
email: "qu...@example.com", remember_token: nil, crypted_password: nil, 
password_reset_code: nil, salt: nil, activation_code: nil, 
remember_token_expires_at: nil, activated_at: nil, deleted_at: nil, 
state: "passive", created_at: nil, updated_at: nil>
>> record.new_record?
=> true
>> record.register!
=> true
>> record.new_record?
=> false

I'm trying to get into this plugin, but it seems very tricky to me...
-- 
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to