Module: RMceUploadr
- Defined in:
- lib/rmce_uploadr.rb,
lib/rmce_uploadr/app/app.rb
Overview
main sinatra app, inside RMceUploadr module.
Defined Under Namespace
Class Method Summary collapse
-
.dbconf=(filename_or_hash) ⇒ Object
Establishes a connection pool for RMceUploadr::Image.
Class Method Details
.dbconf=(filename_or_hash) ⇒ Object
Establishes a connection pool for RMceUploadr::Image
Expects a config/database.yml (as in Rails) database config file or directly a hash in the format of ActiveRecord::Base#establish_connection
48 49 50 51 52 |
# File 'lib/rmce_uploadr.rb', line 48 def self.dbconf=(filename_or_hash) dbconf = filename_or_hash.kind_of?(Hash) ? filename_or_hash : YAML.load_file(filename)[environment] RMceUploadr::Image.establish_connection(dbconf) RMceUploadr::Image.logger = Logger.new(STDOUT) end |