Re: [Rails] Re: How to overwrite devise user session attributes?

2012-09-22 Thread Hassan Schroeder
On Sat, Sep 22, 2012 at 9:26 AM, Mauro wrote: > Sorry but I don't undestand very well. > In https://github.com/plataformatec/devise is said that user_session > is an helper to access the session of the successfully signed in user. > So after signed in I expect to find something in user_session so

Re: [Rails] Re: How to overwrite devise user session attributes?

2012-09-22 Thread Mauro
On 22 September 2012 17:32, Hassan Schroeder wrote: > On Sat, Sep 22, 2012 at 8:03 AM, Mauro wrote: > >> Yes I want to save in session but how can access the session? >> user_session hash is empty. > > session["foo"] = "bar" > > Of course it's empty until you put something there :-) Sorry but I

Re: [Rails] Re: How to overwrite devise user session attributes?

2012-09-22 Thread Hassan Schroeder
On Sat, Sep 22, 2012 at 8:03 AM, Mauro wrote: > Yes I want to save in session but how can access the session? > user_session hash is empty. session["foo"] = "bar" Of course it's empty until you put something there :-) -- Hassan Schroeder hassan.schroe...@gmail.com htt

Re: [Rails] Re: How to overwrite devise user session attributes?

2012-09-22 Thread Mauro
On 22 September 2012 16:33, Hassan Schroeder wrote: > On Sat, Sep 22, 2012 at 7:05 AM, Mauro wrote: > >>> The guest user signed in successfully, now its name is, for example, >>> "guest" " guest". >>> current_user.name is guest guest. >>> After signed in I present a form with a name input field a

Re: [Rails] Re: How to overwrite devise user session attributes?

2012-09-22 Thread Hassan Schroeder
On Sat, Sep 22, 2012 at 7:05 AM, Mauro wrote: >> The guest user signed in successfully, now its name is, for example, >> "guest" " guest". >> current_user.name is guest guest. >> After signed in I present a form with a name input field and a surname >> input field. >> Submitting the form I want t

[Rails] Re: How to overwrite devise user session attributes?

2012-09-22 Thread Mauro
On 21 September 2012 12:50, Mauro wrote: > I'm using devise for authentication: > In my user model I've do: > > def name > "#{first_name} #{last_name}" > end > > to have a name method. > After signed in successfully I can use current_user.name. > I want to overwrite name method if the user is