Displaying 1 result from an estimated 1 matches for "foo_proposal".
Did you mean:
  foo_proposals
  
2005 Dec 16
0
relationship help (not a personal problem)
...ip.
Say I have table/class Foo.
Users get to decide to create Foo (or update or delete Foo) based on a 
user first proposing a change (class FooProposal), then users voting on 
that change (class FooProposalBallot).
I was thinking something like ...
class Foo < ActiveRecord::Base
  has_many :foo_proposals # Foo can be changed any # of times
  belongs_to :user # who proposed to create Foo in the first place
end
class FooProposal < ActiveRecord::Base
  has_many :foo_proposal_ballots # each user can vote on a proposal once
  belongs_to :user # who proposed the proposal
  belongs_to :foo
  # ^^^ t...