I just run in a very strange behavior. In one of my actions, I trigger: @object.update_attributes(:attr1 => ...) Now in the corresponding view, @object is nil. Is that a normal behavior from Rails? Why would it unset the object? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 20 Nov 2008, at 17:26, Fernando Perez wrote:> > I just run in a very strange behavior. > > In one of my actions, I trigger: @object.update_attributes(:attr1 => > ...) > > Now in the corresponding view, @object is nil. Is that a normal > behavior > from Rails? Why would it unset the object?I doubt that is the whole story. Post more information Ffred> > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 20 Nov 2008, at 17:26, Fernando Perez wrote: > >> >> I just run in a very strange behavior. >> >> In one of my actions, I trigger: @object.update_attributes(:attr1 => >> ...) >> >> Now in the corresponding view, @object is nil. Is that a normal >> behavior >> from Rails? Why would it unset the object? > > I doubt that is the whole story. Post more information > > FfredThank your Frederick for your prompt answer. You were perfectly right, I hadn''t seen that I was doing something so stupid as: @object.update_attributes(:attr1 => @object.attr1) That kind of recursion is definitely forbidden. I don''t know how such a silly idea came to my mind. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---