Ok, I'm pretty sure this isn't what you're after:

    transition :reset_password, { :active => :active }, :available_to => 
:key_holder,
               :params => [ :password, :password_confirmation ] do
       after_save :reincarnate_pass
       puts "barszcz z grzybami"
    end

Your after_save definition should be external to any method or block or 
you'll get unpredictable results.  Change this spot to be just 
reincarnate_pass (not the symbol, call the method).

Next, your after_save method, needs to check if the password changed, unless 
the only time the user is saved is on password change but I wouldn't 
normally make that assumption as it's quite easy to break.  In other words, 
your existing reincarnate_pass method won't work for your after_save check.

Also, probably should be a before_save instead of after_save.  My bad.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to