Sha256: 350081e6476aa2197ce96110b5f21ba3bdf29c8d832d41cd37bf0dd7c52f3e0a
Contents?: true
Size: 763 Bytes
Versions: 2
Compression:
Stored size: 763 Bytes
Contents
require 'trice/controller_methods/raw_reference_time' require 'trice/controller_methods/reference_time_assignment' require 'trice/controller_methods/stub_configuration' module Trice module ControllerMethods extend ActiveSupport::Concern included do |controller| if controller.ancestors.include?(ActionController::Base) unless controller.middleware_stack.include?(RawReferenceTime) controller.use RawReferenceTime end config = StubConfiguration.new(Trice.support_requested_at_stubbing) prepend_around_action ReferenceTimeAssignment.new(config) helper_method :requested_at hide_action :requested_at end end def requested_at Trice.reference_time end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
trice-0.2.1 | lib/trice/controller_methods.rb |
trice-0.2.0 | lib/trice/controller_methods.rb |