Module: Amistad::HasActions
- Defined in:
- lib/amistad/has_actions.rb
Class Method Summary collapse
Class Method Details
.included(receiver) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/amistad/has_actions.rb', line 3 def self.included(receiver) if receiver.ancestors.map(&:to_s).include?("ActiveRecord::Base") receiver.class_exec do include Amistad::ActiveRecord::HasActions end else raise "Amistad-action only supports ActiveRecord" end end |