Module: RailsWayback::ControllerExtensions

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

Overview

Included in every ActionController::Base subclass. When a request carries ?_wayback_ref=<sha> and the gem is enabled, it leases the materialised ref and prepends its directories 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_ref ⇒ Object



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

def rails_wayback_active_ref
  @__rails_wayback_active_ref
end