Class: Sitepress::RailsConfiguration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeRailsConfiguration

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_resourcesObject

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_engineObject



17
18
19
# File 'lib/sitepress/rails_configuration.rb', line 17

def parent_engine
  @parent_engine ||= Rails.application
end

#siteObject



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_pathObject

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