Module: Doorkeeper::Orm::ActiveRecord

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

Class Method Summary collapse

Class Method Details

.initialize_models!Object


4
5
6
7
8
9
10
11
12
13
14
# File 'lib/doorkeeper/orm/active_record.rb', line 4

def self.initialize_models!
  require 'doorkeeper/orm/active_record/access_grant'
  require 'doorkeeper/orm/active_record/access_token'
  require 'doorkeeper/orm/active_record/application'

  if Doorkeeper.configuration.active_record_options[:establish_connection]
    [Doorkeeper::AccessGrant, Doorkeeper::Application, Doorkeeper::AccessGrant].each do |c|
      c.send :establish_connection, Doorkeeper.configuration.active_record_options[:establish_connection]
    end
  end
end