On 10 February 2011 09:56, Mauro <[email protected]> wrote: > On 10 February 2011 09:54, Michael Pavling <[email protected]> wrote: >> On 10 February 2011 09:51, Peter Hickman <[email protected]> >> wrote: >>>On 10 February 2011 09:37, Mauro >>>> Can't I test if an object is saved or not in the database? >>> >>> Well an unsaved object will have an id of nil. >> >> or you can use the ".new_record?" method. >> > > I'll try soon.
It' s not the solution. After I've saved @document and @delivery I go to show action where I have @delivery=Delivery.new and @document=Document.new, so new_record is always true. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

