On 27 July 2012 07:22, Sumit Srivastava <sumit.theinvinci...@gmail.com> wrote:
> I have been following following tutorial to make a user login session.
>  http://www.aidanf.net/rails_user_authentication_tutorial
>
> I used the following action to encrypt the password.
>>
>>   def password
>>     #debugger
>>     @password1=pass
>>     self.salt = SecureRandom.hex(10) if !self.salt?
>>     self.password = User.encrypt(@password1, self.salt)
>>   end
>
>
> but when it is called following error is generated.
>
>> SystemStackError (stack level too deep):
>>   app/models/user.rb:26:in `password='
>>   app/models/user.rb:27:in `password='
>>   app/controllers/user_controller.rb:31:in `new'
>>   app/controllers/user_controller.rb:31:in `createuser'

Which (if any) of those lines is line 26 in your UserController? What
does the User.encrypt method look like?

-- 
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 https://groups.google.com/groups/opt_out.


Reply via email to