Module: ActionDispatch::Http::Parameters

Defined in:
lib/rails_mobile/mobile_dispatch/parameters.rb

Instance Method Summary collapse

Instance Method Details

#mobile_device_paramterObject



16
17
18
# File 'lib/rails_mobile/mobile_dispatch/parameters.rb', line 16

def mobile_device_paramter
  @env["action_dispatch.request.mobile_device"]
end

#parametersObject

Returns both GET and POST parameters in a single hash.



5
6
7
8
9
10
11
12
13
14
# File 'lib/rails_mobile/mobile_dispatch/parameters.rb', line 5

def parameters
  @env["action_dispatch.request.parameters"] ||= begin
    params = request_parameters.merge(query_parameters)
    params.merge!(path_parameters)
    unless mobile_device_paramter.nil?
      params.merge!(mobile_device_paramter)
    end
    encode_params(params).with_indifferent_access
  end
end