.models ⇒ Object

.rails_init ⇒ Object

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

# File 'lib/couch_potato/railtie.rb', line 5defself.rails_initpath=Rails.root.join('config/couchdb.yml')ifFile.exist?(path)require'yaml'config=YAML::load(ERB.new(File.read(path)).result)[Rails.env]ifconfig.is_a?(String)CouchPotato::Config.database_name=configelseCouchPotato::Config.database_name=config['database']CouchPotato::Config.split_design_documents_per_view=config['split_design_documents_per_view']ifconfig['split_design_documents_per_view']CouchPotato::Config.default_language=config['default_language']ifconfig['default_language']endelseRails.logger.warn"Rails.root/config/couchdb.yml does not exist. Not configuring a database."endend