I am trying to trigger child callbacks for embeds many relations. For example:
class User
embeds_many :phones, cascade_callbacks: true
end
class Phone
embedded_in :user, inverse_of: :phones
before_save :callback_after_save
def callback_after_save
#Do some stuff here
puts "callback fired"
end
end
When I do
User.last.save
I see
=>true
The callbacks for the phones are not fired as they have not been changed.(performance issues sighted by mongoid)
Is there any way of forcing callbacks to be fired for each phone when the user is saved (ignoring performance issues)?