Skip to content

Instantly share code, notes, and snippets.

@landlessness
Created September 24, 2010 19:37
Show Gist options
  • Select an option

  • Save landlessness/595901 to your computer and use it in GitHub Desktop.

Select an option

Save landlessness/595901 to your computer and use it in GitHub Desktop.
class AddOn < ActiveRecord::Base
has_many :pricing_plans, :dependent => :destroy
end
class PricingPlan < ActiveRecord::Base
has_many :subscriptions
end
class Subscription < ActiveRecord::Base
belongs_to :person
belongs_to :pricing_plan
end
class Person < ActiveRecord::Base
has_many :subscriptions
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment