module Flatrack::View::RequestHelper
View
helpers to access the params and path
Public Instance Methods
current_page()
click to toggle source
Returns the page being displayed @return [String]
# File lib/flatrack/view/request_helper.rb, line 20 def current_page @response.request.page end
Also aliased as: page
current_path()
click to toggle source
Returns the path before rewrites @return [String]
# File lib/flatrack/view/request_helper.rb, line 13 def current_path @response.request.path end
Also aliased as: path
params()
click to toggle source
Returns the query parameters @return [Hash]
# File lib/flatrack/view/request_helper.rb, line 7 def params @response.request.params end
request_ip()
click to toggle source
Returns the IP address for the request @return [String]
# File lib/flatrack/view/request_helper.rb, line 27 def request_ip @response.request.env['REMOTE_ADDR'] end