How to update all when you need callbacks fired?

Instead of using each/find_each, try using update method instead:

models.update(column: value)

Which is just a wrapper for the following:

models.each{|x| x.update(column: value)}

No, to run callbacks you have to instantiate an object which is expensive operation. I think the only way to solve your problem is to refactor actions that you're doing in callback into separate method that could use data retrieved by select_all method without object instantiation.


Here's another way of triggering callbacks. Instead of using

models.update_all(params)

you can use

models.find_each { |m| m.update_attributes(params) }

I wouldn't recommend this approach if you're dealing with very large amounts of data, though.
Hope it helps!