Module: Sitepress

Defined in:
lib/sitepress/rails.rb,
lib/sitepress/engine.rb,
lib/sitepress/route_constraint.rb,
lib/sitepress/rails_configuration.rb,
app/helpers/sitepress/application_helper.rb,
app/controllers/sitepress/site_controller.rb,
lib/sitepress/extensions/partials_remover.rb,
lib/sitepress/extensions/index_request_path.rb,
lib/sitepress/extensions/rails_request_paths.rb,
app/controllers/concerns/sitepress/site_pages.rb

Defined Under Namespace

Modules: ApplicationHelper, Extensions, SitePages Classes: Configuration, Engine, RailsConfiguration, RouteConstraint, SiteController

Constant Summary collapse

PageNotFoundError =

Rescued by ActionController to display page not found error.

Class.new(StandardError)

Class Method Summary collapse

Class Method Details

.configurationObject

Default configuration object for Sitepress Rails integration.


24
25
26
# File 'lib/sitepress/rails.rb', line 24

def self.configuration
  @configuration ||= RailsConfiguration.new
end

.configure(&block) ⇒ Object


32
33
34
# File 'lib/sitepress/rails.rb', line 32

def self.configure(&block)
  block.call configuration
end

.reset_configurationObject


28
29
30
# File 'lib/sitepress/rails.rb', line 28

def self.reset_configuration
  @configuration = nil
end

.siteObject

Make site available via Sitepress.site from Rails app.


19
20
21
# File 'lib/sitepress/rails.rb', line 19

def self.site
  configuration.site
end