Module: Stagehand::Configuration
Instance Method Summary collapse
- #ghost_mode? ⇒ Boolean
- #production_connection_name ⇒ Object
-
#single_connection? ⇒ Boolean
Returns true if the production and staging connections are the same.
- #staging_connection_name ⇒ Object
Instance Method Details
#ghost_mode? ⇒ Boolean
19 20 21 |
# File 'lib/stagehand/configuration.rb', line 19 def ghost_mode? !!Rails.configuration.x.stagehand.ghost_mode end |
#production_connection_name ⇒ Object
15 16 17 |
# File 'lib/stagehand/configuration.rb', line 15 def production_connection_name Rails.configuration.x.stagehand.production_connection_name || Rails.env.to_sym end |
#single_connection? ⇒ Boolean
Returns true if the production and staging connections are the same. Use case: Front-end devs may not have a second database set up as they are only concerned with the front end
25 26 27 |
# File 'lib/stagehand/configuration.rb', line 25 def single_connection? staging_connection_name == production_connection_name end |
#staging_connection_name ⇒ Object
11 12 13 |
# File 'lib/stagehand/configuration.rb', line 11 def staging_connection_name Rails.configuration.x.stagehand.staging_connection_name || Rails.env.to_sym end |