Created
June 25, 2011 02:16
-
-
Save thoughtpunch/1046031 to your computer and use it in GitHub Desktop.
config/database.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#config/database.rb | |
ActiveRecord::Base.configurations[:development] = { | |
:adapter => 'postgresql', | |
:host => 'localhost', | |
:port => '5432', | |
:database => 'trustmob_ui_development', | |
:username => 'postgres', | |
:password => '' | |
} | |
ActiveRecord::Base.configurations[:production] = { | |
:adapter => 'postgresql', | |
:host => 'localhost' | |
:database => 'trustmob_ui_production.db', | |
:username => 'postgres', | |
:password => '' | |
} | |
ActiveRecord::Base.configurations[:test] = { | |
:adapter => 'postgresql', | |
:host => 'localhost' | |
:database => 'trustmob_ui_test.db', | |
:username => 'postgres', | |
:password => '' | |
} | |
# Setup our logger | |
#ActiveRecord::Base.logger = logger | |
# Include Active Record class name as root for JSON serialized output. | |
ActiveRecord::Base.include_root_in_json = true | |
# Store the full class name (including module namespace) in STI type column. | |
ActiveRecord::Base.store_full_sti_class = true | |
# Use ISO 8601 format for JSON serialized times and dates. | |
ActiveSupport.use_standard_json_time_format = true | |
# Don't escape HTML entities in JSON, leave that for the #json_escape helper. | |
# if you're including raw json in an HTML page. | |
ActiveSupport.escape_html_entities_in_json = false | |
# Now we can estabilish connection with our db | |
ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations[Padrino.env]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment