I have a has_many :through and I would like to take values from one
side and put them in the join model. Perhaps some code would be more
class Recipe < AR::Base
has_many :fermentables, :through => :fermentable_ingredients
class Fermentable < AR::Base
has_many :recipes, :through => :fermentable_ingredients
classFermentableIngredient < AR::Base
Simple enough. When I assign a fermentable to a
fermentable_ingredienet, I would like to populate the
fermentable_ingredient with values in fermentable. Something like
self.potential = f.potential if potential.nil?
self.color = f.color if color.nil?
I know this doesn’t work because the call to super fails.
Is there a clean way to do this?