I have the following has_many work with proc to capture a parameter for context:
has_many :subclass_point_analytics, :conditions => proc {"assessment_id = #{self.send(:assessment_id)}" }, :foreign_key => 'gid', :dependent => :destroy
I use Rails 4, and he (rightfully) complains about using: conditions. After 30 minutes and many attempts, I canβt understand how to convert: conditions to the format β {where ...}. I would appreciate someone who knows the proc syntax to help me understand correctly.
source share