Pavling,

I removed the line
*self.password = User.encrypt(@password1, self.salt)

*and rest worked fine. So I deduced that this might be calling password
action again and going into recursive action. That's the reason I changed
my variables as explained earlier..

Tom,
That might be another solution. But what I am trying to know is why isn't
this method working. And how is the action *def password=(pass)  *actually
being called. Because I didn't see any exclusive line where it is being
called. My analysis says it is being executed because of the
*attr_accessor*and having name same as that of the column
*password.

Am I right?

*Regards
Sumit Srivastava

The power of imagination makes us infinite...


On 27 July 2012 16:12, Michael Pavling <pavl...@gmail.com> wrote:

> On 27 July 2012 11:37, sumit srivastava <sumit.theinvinci...@gmail.com>
> wrote:
> > This is what I receive,
> >
> > 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'
> >
> > Here createuser action is used to store the user info into database.
> >
> > Line 31 reads as follows,
> > @user = User.new(params[:user])
>
> I would put a breakpoint on that line and then keep stepping into
> until you see where it's looping :-/
>
> --
> 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.
>
>
>

-- 
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