Module: Jat::Plugins::SimpleApiActiverecord

Defined in:
lib/jat/plugins/simple_api/plugins/simple_api_activerecord/simple_api_activerecord.rb

Class Method Summary collapse

Class Method Details

.before_load(jat_class, **_opts) ⇒ Object

Raises:



10
11
12
13
# File 'lib/jat/plugins/simple_api/plugins/simple_api_activerecord/simple_api_activerecord.rb', line 10

def self.before_load(jat_class, **_opts)
  return if jat_class.plugin_used?(:simple_api)
  raise Error, "Please load :simple_api plugin first"
end

.load(jat_class, **opts) ⇒ Object



15
16
17
18
# File 'lib/jat/plugins/simple_api/plugins/simple_api_activerecord/simple_api_activerecord.rb', line 15

def self.load(jat_class, **opts)
  jat_class.plugin :simple_api_preloads, **opts
  jat_class.plugin :base_activerecord_preloads, **opts
end

.plugin_nameObject



6
7
8
# File 'lib/jat/plugins/simple_api/plugins/simple_api_activerecord/simple_api_activerecord.rb', line 6

def self.plugin_name
  :simple_api_activerecord
end