开发者

Rails 3 Exception Notification error

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


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 %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜