views:

60

answers:

1

I am converting a rails 2.3.5 app to rails 3 app. I am getting an error in the below code

the error

Undefined method `filter_sensitive_post_data_parameters' for #<#<Class:0x0000010726a478>:0x000001069e7080>

in app/views/exception_notifier/_request.rhtml

  <% if @request.respond_to?(:protocol) %>
        * URL       : <%= @request.protocol %><%= @host %><%= @request.request_uri %>
        * IP address: <%= @request.env["HTTP_X_FORWARDED_FOR"] || @request.env["REMOTE_ADDR"] %>
        * Parameters: <%= send(:filter_sensitive_post_data_parameters,@request.parameters).inspect %>
        * Rails root: <%= @rails_root %>
        <% else  %>
        * Exception did not occur in controller, and was recoverable.
        <% end %>

stuck for 3 hours. Please help

A: 

It maybe because this method doesn't exist anymore in Rails 3. Change it by request.filtered_parameters()

<% if request.respond_to?(:protocol) %>
        * URL       : <%= request.protocol %><%= @host %><%= request.request_uri %>
        * IP address: <%= request.env["HTTP_X_FORWARDED_FOR"] || request.env["REMOTE_ADDR"] %>
        * Parameters: <%= request.filtered_parameters().inspect %>
        * Rails root: <%= @rails_root %>
<% else  %>
        * Exception did not occur in controller, and was recoverable.
<% end %>
shingara
getting this error- Missing rack.input
lakshmanan
And without @ ? I update my answer with that. And how you define this @request ? Where is raise this rack.input missing ?
shingara
this error shows up in the line request.filtered_parameters().inspect
lakshmanan