Module: Lockdown::Orms::ActiveRecord::Helper

Defined in:
lib/lockdown/orms/active_record.rb

Overview

class block

Instance Method Summary collapse

Instance Method Details

#database_execute(query) ⇒ Object



26
27
28
# File 'lib/lockdown/orms/active_record.rb', line 26

def database_execute(query)
  orm_parent.connection.execute(query)
end

#database_query(query) ⇒ Object



30
31
32
# File 'lib/lockdown/orms/active_record.rb', line 30

def database_query(query)
  orm_parent.connection.execute(query)
end

#database_table_exists?(klass) ⇒ Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/lockdown/orms/active_record.rb', line 34

def database_table_exists?(klass)
  klass.table_exists?
end

#orm_parentObject



22
23
24
# File 'lib/lockdown/orms/active_record.rb', line 22

def orm_parent
  ::ActiveRecord::Base
end