Module: ActiveRecord::Turntable::ConfigurationMethods
- Defined in:
- lib/active_record/turntable/configuration_methods.rb
Constant Summary collapse
- DEFAULT_PATH =
File.dirname(File.dirname(__FILE__))
Instance Method Summary collapse
- #turntable_app_root_path ⇒ Object
- #turntable_config ⇒ Object
- #turntable_configuration_file ⇒ Object (also: #turntable_config_file)
- #turntable_configuration_file=(filename) ⇒ Object (also: #turntable_config_file=)
Instance Method Details
#turntable_app_root_path ⇒ Object
17 18 19 |
# File 'lib/active_record/turntable/configuration_methods.rb', line 17 def turntable_app_root_path defined?(::Rails.root) ? ::Rails.root.to_s : DEFAULT_PATH end |
#turntable_config ⇒ Object
21 22 23 |
# File 'lib/active_record/turntable/configuration_methods.rb', line 21 def turntable_config turntable_configuration end |
#turntable_configuration_file ⇒ Object Also known as: turntable_config_file
5 6 7 |
# File 'lib/active_record/turntable/configuration_methods.rb', line 5 def turntable_configuration_file @turntable_configuration_file ||= File.join(turntable_app_root_path, "config/turntable.yml") end |
#turntable_configuration_file=(filename) ⇒ Object Also known as: turntable_config_file=
11 12 13 |
# File 'lib/active_record/turntable/configuration_methods.rb', line 11 def turntable_configuration_file=(filename) @turntable_configuration_file = filename end |