Ah! thank you a lot :) Works flawless now. Best regards.
On 5 jun, 10:29, Luca Guidi <[email protected]> wrote: > Hi, just gave a look at your code, the problem is trivial: you shouldn't > call both #update_attributes *and* #save, because they performs the same > operation. The former is a syntax shortcut: > > person.name = "luca" > person.age = 26 > person.save > > # or > > person.update_attributes :name => "luca", :age => 26 > > So, updating *twice* your record, the detalle de compras counter will be > decreased assuming the value of -1. > > Cheers, > Luca > -- > blog:www.lucaguidi.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" 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-core?hl=en -~----------~----~----~----~------~----~------~--~---
