Module: ProtectedRecord::ChangeLog::Changeling
- Defined in:
- lib/protected_record/change_log.rb
Overview
Include this module in models inheriting from AR::Base
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/protected_record/change_log.rb', line 22 def self.included(base) # Include this in AR models only return unless base.ancestors.include?(ActiveRecord::Base) base.has_many :change_log_records, as: :recordable, class_name: "ProtectedRecord::ChangeLog::Record" end |