Sha256: cbf6c77dafc9839eb6a090948c4039a1ea1505e9069cb7ab3837346b683cbff3
Contents?: true
Size: 729 Bytes
Versions: 17
Compression:
Stored size: 729 Bytes
Contents
require "active_record" module Dummy # Storage for application settings. # # @example # Dummy::Application.configure do |config| # config.env = :test # end # class Application class << self # Configuration settings wrapper for the # <tt>ActiveRecord::Tasks::DatabaseTasks</tt>. # # Establishes AR connection after configuration. # def configure yield tasks base.configurations = tasks.database_configuration base.establish_connection(tasks.env) end private def base @base ||= ActiveRecord::Base end def tasks @tasks ||= ActiveRecord::Tasks::DatabaseTasks end end end end
Version data entries
17 entries across 17 versions & 1 rubygems