I'm making an app that tracks registered voters and canvassing (knocking on doors). The models look like:
class Voter < ActiveRecord::Base belongs_to :house has_many :canvass_voters end class House < ActiveRecord::Base has_many :voters has_many :canvasses has_many :canvass_voters, :through => :canvasses end class Canvass < ActiveRecord::Base belongs_to :house has_many :canvass_voters end class CanvassVoter < ActiveRecord::Base belongs_to :canvass belongs_to :voter end The CanvassVoter record is necessary because we may talk to more than one voter when we knock on a door. Here's my problem: when I add a Canvass to a House (ie browsing the Houses, click the Canvass column, click "Create New"), the subform for associating a CanvassVoter is a pull-down list of all voters (thousands!), but I only want it to be a pull-down list of those voters registered at that house. I've been trying to do this a subform override, but I don't know how to reference the house_id from the subform. Any help would be appreciated. -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en.
