Module: Doorkeeper::Orm::ActiveRecord

Defined in:
lib/doorkeeper/orm/active_record.rb,
lib/doorkeeper/orm/active_record/stale_records_cleaner.rb

Defined Under Namespace

Modules: Mixins Classes: StaleRecordsCleaner

Class Method Summary collapse

Class Method Details

.modelsObject


40
41
42
43
44
45
46
# File 'lib/doorkeeper/orm/active_record.rb', line 40

def self.models
  [
    Doorkeeper.config.access_grant_model,
    Doorkeeper.config.access_token_model,
    Doorkeeper.config.application_model,
  ]
end

.run_hooksObject


31
32
33
34
35
36
37
38
# File 'lib/doorkeeper/orm/active_record.rb', line 31

def self.run_hooks
  # Deprecated, will be removed soon
  return unless (options = Doorkeeper.config.active_record_options[:establish_connection])

  Doorkeeper::Orm::ActiveRecord.models.each do |model|
    model.establish_connection(options)
  end
end