I am having some problems using the after_save callback to update a
field on another model, could anyone give me directions?
Here is what I have:
class Model1 < ActiveRecord::Base
self.model2.field = (SomeStuff+somevariable) * some_other_var
class Model2 < ActiveRecord::Base
What is the right way to update the value of the model2.field from
The way you do it looks fine to me. If you want to persist it you will of course have to do something like self.model2.save or self.model2.update_attribute.
What is the issue you're having?