class Sitepress::RailsConfiguration
Configuration object for rails application.
Constants
- DEFAULT_SITE_ROOT
Store in ./app/content by default.
Attributes
cache_resources[RW]
parent_engine[W]
routes[RW]
site[W]
Public Class Methods
new()
click to toggle source
# File lib/sitepress/rails_configuration.rb, line 12 def initialize # Injects routes into parent apps routes when set to true. Set to false # to inject routes manually. self.routes = true # Caches sites between requests. Set to `false` for development environments. self.cache_resources = true end
Public Instance Methods
manifest_file_path()
click to toggle source
Location of Sprockets manifest file
# File lib/sitepress/rails_configuration.rb, line 29 def manifest_file_path site.assets_path.join("config/manifest.js") end
parent_engine()
click to toggle source
# File lib/sitepress/rails_configuration.rb, line 20 def parent_engine @parent_engine ||= Rails.application end
site()
click to toggle source
# File lib/sitepress/rails_configuration.rb, line 24 def site @site ||= Site.new(root_path: default_root) end
Private Instance Methods
default_root()
click to toggle source
# File lib/sitepress/rails_configuration.rb, line 34 def default_root Rails.root.join(DEFAULT_SITE_ROOT) end