ActionDispatch::ShowExceptions - rails upgrade 2.3.x to 3.2.x

13 views
Skip to first unread message

ROR Architect

unread,
Feb 18, 2013, 12:04:56 PM2/18/13
to hk...@googlegroups.com
In my rails2.3.11 app/controllers/application_controller.rb I have this

ActionDispatch::ShowExceptions::rescue_responses["ActionController::RoutingError"] = :not_found

now this feature is deprecated in rails-3.2.11, I am getting this server log

DEPRECATION WARNING: ActionDispatch::ShowExceptions.rescue_responses is deprecated. Please configure your exceptions using a railtie or in your application config instead. (called from ApplicationController at /home/app/demo/app/controllers/application_controller.rb:31)

I need specific help on How to set ActionDispatch::ShowExceptions::rescue_responses in rails3.2.11, so I can't get deprecated warning.

Thanks

PikachuEXE

unread,
Feb 19, 2013, 8:24:08 PM2/19/13
to hk...@googlegroups.com
 I am not sure if this works
But I have similar code dealing with RecordNotFound

```
rescue_from ActionController::RoutingError, with: :handle_routing_error

private

def handle_routing_error
  head :not_found
end
```


Reply all
Reply to author
Forward
0 new messages