lib/wiselinks/controller_methods.rb in wiselinks-0.6.4 vs lib/wiselinks/controller_methods.rb in wiselinks-0.7.0

- old
+ new

@@ -1,11 +1,10 @@ module Wiselinks - module ControllerMethods - - def self.included(base) - base.helper_method :wiselinks_title + module ControllerMethods + def self.included(base) + base.helper_method :wiselinks_title base.before_filter :set_wiselinks_url end protected @@ -13,15 +12,15 @@ 'wiselinks' end def wiselinks_title(value) if self.request.wiselinks? && value.present? - Wiselinks.log("title: #{value}") + 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.url if self.request.wiselinks? + def set_wiselinks_url + self.response.headers['X-Wiselinks-Url'] = request.env['REQUEST_URI'] if self.request.wiselinks? end end -end \ No newline at end of file +end