Sha256: 3404e6a278cead29d3a631702ecae7b459bc5bec0c2b044422fefc22b8f553e1
Contents?: true
Size: 651 Bytes
Versions: 12
Compression:
Stored size: 651 Bytes
Contents
module Wiselinks module Request def self.included(base) base.alias_method_chain :referer, :wiselinks base.alias_method_chain :referrer, :wiselinks end def referer_with_wiselinks self.headers['X-Wiselinks-Referer'] || self.referer_without_wiselinks end def referrer_with_wiselinks self.referer_with_wiselinks end def wiselinks? self.headers['X-Wiselinks'].present? end def wiselinks_template? self.wiselinks? && self.headers['X-Wiselinks'] != 'partial' end def wiselinks_partial? self.wiselinks? && self.headers['X-Wiselinks'] == 'partial' end end end
Version data entries
12 entries across 12 versions & 2 rubygems