Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Initialize constants with values from DB in Rails
- SESSION_DURATION = SystemDB::Configuration.get('session_duration', 0).to_i.minutes
- require "rubygems"
- require "activerecord"
- ActiveRecord::Base.establish_connection (
- :adapter => "mysql",
- :host => "localhost",
- :username => "user",
- :password => "password",
- :database => "some_database")
Add Comment
Please, Sign In to add comment