I’m using the railscasts authentication http://railscasts.com/episodes/250-authentication-from-scratch authorization. How can the edit user profile check password before saving the changes?
Full source code: https://github.com/ryanb/railscasts-episodes/tree/master/episode-250
You should just be able to authenticate using the password entered on the before saving any changes. Similar to what Ryan has for create:
if User.authenticate(params[:email], params[:password])
# save changes