Created
March 4, 2009 17:46
-
-
Save bruce/73916 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sold | |
def self.included(base) | |
base.extend ClassMethods | |
base.instance_eval do | |
belongs_to :seller, :polymorphic => true | |
include InstanceMethods | |
end | |
end | |
module ClassMethods | |
# seller-related class methods | |
end | |
module InstanceMethods | |
# seller-related instance methods | |
end | |
end | |
TheModel.send(:include, Sold) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment