Module: Rakeflow::Database
- Defined in:
- lib/rakeflow/database.rb
Instance Method Summary collapse
Instance Method Details
#config_path ⇒ Object
9 10 11 |
# File 'lib/rakeflow/database.rb', line 9 def config_path File. "../../config/database.yml", __FILE__ end |
#database ⇒ Object
5 6 7 |
# File 'lib/rakeflow/database.rb', line 5 def database YAML::load_file(config_path)[rails_env].with_indifferent_access end |
#rails_env ⇒ Object
13 14 15 |
# File 'lib/rakeflow/database.rb', line 13 def rails_env ENV['RAILS_ENV'] || 'development' end |