Module: HasTrolley
- Defined in:
- lib/has_trolley.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/has_trolley.rb', line 5 def self.included(klass) klass.send :has_one, :trolley, :dependent => :destroy klass.send :delegate, :correct_order, :to => :trolley klass.send :after_create, :create_trolley klass.extend ClassMethods klass.send :include, InstanceMethods end |