Module: Kingsman::Orm

Defined in:
lib/kingsman/orm.rb

Overview

:nodoc:

Defined Under Namespace

Modules: DirtyTrackingMethods

Class Method Summary collapse

Class Method Details

.active_record?(model) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/kingsman/orm.rb', line 3

def self.active_record?(model)
  defined?(ActiveRecord) && model < ActiveRecord::Base
end

.included(model) ⇒ Object



7
8
9
# File 'lib/kingsman/orm.rb', line 7

def self.included(model)
  model.include DirtyTrackingMethods
end