Sha256: 1bac717c9cb33401bc74ab82cc0b4fab944f52279c505d3a9269fc094ac2c1d6

Contents?: true

Size: 266 Bytes

Versions: 5

Compression:

Stored size: 266 Bytes

Contents

require 'active_record'

ENV['RACK_ENV'] ||= 'development'

def sqlite_db name
  File.join(File.dirname(__FILE__), "./db/#{name}.sqlite3")
end

ActiveRecord::Base.establish_connection(
    :adapter => "sqlite3",
    :database  => sqlite_db(ENV['RACK_ENV'].to_sym)
)

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
nyny-1.0.2 examples/active_record/database.rb
nyny-1.0.1 examples/active_record/database.rb
nyny-1.0.0 examples/active_record/database.rb
nyny-1.0.0.pre1 examples/active_record/database.rb
little_frankie-1.0.0.pre1 examples/active_record/database.rb