Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
class Subscription has_many :subscription_items has_many :subscribables, :through => subscription_items end class SubscriptionItem belongs_to :subscription belongs_to :subscribable, :polymorphic => true end class XProduct has_many :subscription_items, :as => :subscribable end class YProduct has_many :subscription_items, :as => :subscribable end
From the Design Piracy series on my blog: