Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/foreigner/connection_adapters/sqlite3_adapter.rb

Class Method Summary collapse

Class Method Details

.sqlite3_connection_with_foreign_key(config) ⇒ Object



4
5
6
7
8
# File 'lib/foreigner/connection_adapters/sqlite3_adapter.rb', line 4

def sqlite3_connection_with_foreign_key(config)
  sqlite3_connection_without_foreign_key(config).tap do |db|
    db.execute("pragma foreign_keys = on")
  end
end