Class: Sitepress::RailsConfiguration
- Inherits:
-
Object
- Object
- Sitepress::RailsConfiguration
- Defined in:
- lib/sitepress/rails_configuration.rb
Overview
Configuration object for rails application.
Constant Summary collapse
- DEFAULT_SITE_ROOT =
Store in ./app/content by default.
"app/content".freeze
Instance Attribute Summary collapse
-
#cache_resources ⇒ Object
Returns the value of attribute cache_resources.
- #parent_engine ⇒ Object
- #site ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ RailsConfiguration
constructor
A new instance of RailsConfiguration.
-
#manifest_file_path ⇒ Object
Location of Sprockets manifest file.
Constructor Details
#initialize ⇒ RailsConfiguration
Returns a new instance of RailsConfiguration.
12 13 14 15 |
# File 'lib/sitepress/rails_configuration.rb', line 12 def initialize # Caches sites between requests. Set to `false` for development environments. self.cache_resources = true end |
Instance Attribute Details
#cache_resources ⇒ Object
Returns the value of attribute cache_resources.
9 10 11 |
# File 'lib/sitepress/rails_configuration.rb', line 9 def cache_resources @cache_resources end |
#parent_engine ⇒ Object
17 18 19 |
# File 'lib/sitepress/rails_configuration.rb', line 17 def parent_engine @parent_engine ||= Rails.application end |
#site ⇒ Object
21 22 23 |
# File 'lib/sitepress/rails_configuration.rb', line 21 def site @site ||= Site.new(root_path: default_root) end |
Instance Method Details
#manifest_file_path ⇒ Object
Location of Sprockets manifest file
26 27 28 |
# File 'lib/sitepress/rails_configuration.rb', line 26 def manifest_file_path site.assets_path.join("config/manifest.js") end |