It is defined in restful-authentication / lib / authorization / stateful_roles.rb mode
event :register do transitions :from => :passive, :to => :pending, :guard => Proc.new {|u| !(u.crypted_password.blank? && u.password.blank?) } end
The actual register! method register! It is created dynamically from this event by the act_as_state_machine plugin, which should also be in your project. This method was inserted into your controller, because when you generated your controller, you specified either --stateful or '--aasm'.
There is a very good entry on act_as_state_machine here if you want to know more.
source share