Sha256: 71262355c360663be5c0f4c4d53375a23703b9cb401988599b69e6200e421a77
Contents?: true
Size: 683 Bytes
Versions: 9
Compression:
Stored size: 683 Bytes
Contents
module Wiselinks module ControllerMethods def self.included(base) base.helper_method :wiselinks_title base.before_filter :set_wiselinks_url end protected def wiselinks_layout 'wiselinks' end def wiselinks_title(value) if self.request.wiselinks? && value.present? Wiselinks.log("title: #{value}") self.response.headers['X-Wiselinks-Title'] = URI.encode(value) end end def set_wiselinks_url # self.response.headers['X-Wiselinks-Url'] = request.env['REQUEST_URI'] if self.request.wiselinks? self.response.headers['X-Wiselinks-Url'] = request.url if self.request.wiselinks? end end end
Version data entries
9 entries across 9 versions & 1 rubygems