Hello guys, Sorry for revamping this, but I'm having exactly the same use case as described.
The main point for not having this implemented seems to be performance problems of instantiating every model and updating its updated_at field. Should it be doable via a batch update without instantiating any models at all? quinta-feira, 15 de Abril de 2010 às 19:55:50 UTC+1, Diego Carrion escreveu: > > Hi, > > it would be nice to have the touch option in has_many associations also. > > I have a scenario like this: > > An user has some credit (money) and some advertises. Each advertise can be > enabled or disabled depending on some rules. One of the rules is that the > user should have money. Each time the money of the user change, the > advertises are touched, enabled/disabled and then cached, as they are much > more requested that updated. > > I have created a ticket with a patch attached: > > > https://rails.lighthouseapp.com/projects/8994/tickets/4392-add-touch-option-to-has_many-associations > > > <https://rails.lighthouseapp.com/projects/8994/tickets/4392-add-touch-option-to-has_many-associations> > cheers > > -- > Diego Carrion > http://www.diegocarrion.com > http://www.mouseoverstudio.com/blog/ > http://www.twitter.com/dcrec1 > http://www.workingwithrails.com/person/13580-diego-carrion > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.
