search for: changes_comments_environments

Displaying 1 result from an estimated 1 matches for "changes_comments_environments".

2007 Jun 03
3
Contextual Associations
...: changes, environments, comments 2. changes are many-to-many to environments 3. changes has-many comments Here''s the tricky part: 4. environments has-many comments dependent on the current environment. Tables: changes, environments, changes_environments, comments, changes_comments, changes_comments_environments. How in would one associate comments to an environment according to the change on which it''s called through? i.e. ===================================== change = Changes.find(params[:change_id:]) print "For change #{change.id}\n" change.environments.each do |env| print &quot...