Class: Settings
- Inherits:
-
Settingslogic
- Object
- Settingslogic
- Settings
- Includes:
- Atreides::Extendable
- Defined in:
- app/models/settings.rb
Overview
Provides access to configuration options stored in config/settings.yml
Instance Method Summary collapse
- #default_cross_post_to?(service) ⇒ Boolean
-
#s3_enabled? ⇒ Boolean
Check if we can use an Amazon S3 bucket to store photos.
Instance Method Details
#default_cross_post_to?(service) ⇒ Boolean
12 13 14 15 16 |
# File 'app/models/settings.rb', line 12 def default_cross_post_to? service setting = Settings.default_cross_posts && Settings.default_cross_posts[service] # by default, if nothing specified in Settings.yml return true if setting.nil? setting end |
#s3_enabled? ⇒ Boolean
Check if we can use an Amazon S3 bucket to store photos
8 9 10 |
# File 'app/models/settings.rb', line 8 def s3_enabled? !!(s3.access_key_id.present? && s3.secret_access_key.present? if respond_to? :s3) end |