Displaying 2 results from an estimated 2 matches for "password_match".
2012 Sep 17
1
require current_password to update user information
...m'' %><br />
<%= f.password_field :password_confirmation, size: 40 %>
</div>
*I''ve tried using a before_update :confirm_password in the User model, but
it hasn''t worked.*
*I created a private method in the user controller*
*
*
private
def password_match
@user = User.find(params[:id])
@user.authenticate(params[:current_password)
end
then call a before_filter :password_match, :only => [:update] in the user
controller.
Can anyone help, please. Thank you.
--
You received this message because you are subscribed to the Google Groups &quo...
2009 Apr 29
7
problem with nil.user
Hi all, I''ve put new code into my app so that an administrator will have
extra privileges (administer users, edit pages). The error is:
''Couldn''t find User without an ID''
So the app is looking for a logged in user when the homepage is
accessed.
Heres my code:
site/index view:
<% if is_logged_in? and logged_in_user.has_role?(''Moderator'')