Module: RailsWayback::ControllerExtensions

Extended by:
ActiveSupport::Concern
Defined in:
lib/rails_wayback/controller_extensions.rb

Overview

Auto-included in every ActionController::Base subclass through the engine's initializer. Does nothing on ordinary requests. When a request carries ?_wayback_ref=<sha> and the gem is enabled, it materialises the ref and prepends the sandbox to the view paths so the current controller renders historical templates while keeping its own instance variables intact.

Constant Summary collapse

WAYBACK_PARAM =
"_wayback_ref"
"rails_wayback_ref"
RESPONSE_HEADER =
"X-RailsWayback-Ref"

Instance Method Summary collapse

Instance Method Details

#rails_wayback_active_refObject



22
23
24
# File 'lib/rails_wayback/controller_extensions.rb', line 22

def rails_wayback_active_ref
  @__rails_wayback_active_ref
end