Have you tried adding the last line? def create @supplier = Supplier.new(params[:supplier]) @supplier.durc_expiry_date = @supplier.durc_issue_date + 90.days
@suplier.save <-------------------THIS ONE ..... On Jan 7, 10:55 pm, Mauro <[email protected]> wrote: > On 7 January 2011 22:45, Vilèlm <[email protected]> wrote: > > > IMHO, your first attempt, update attributes in model, is the best > > practice because model is where you keep attention of your data. > > Anyway, to save your data in the controller: > > > def create > > �...@supplier = Supplier.new(params[:supplier]) > > @supplier.durc_expiry_date = @supplier.durc_issue_date + 90.days > > I do that but it seems doesn't work. -- 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.

