ROR Architect
2013-Feb-18 17:09 UTC
ActionDispatch::ShowExceptions - rails upgrade 2.3.x to 3.2.x
In my rails2.3.11 app/controllers/application_controller.rb I have this ActionDispatch::ShowExceptions::rescue_responses["ActionController::RoutingError"]> = :not_foundnow 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. I am using Jruby 1.7.2 and rails 3.2.11 Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Steve Klabnik
2013-Feb-18 20:53 UTC
Re: ActionDispatch::ShowExceptions - rails upgrade 2.3.x to 3.2.x
Please ask questions about how to use the frameowork on https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-talk . This list is for discussion of core features of the framework. If you believe you''ve found a bug, please make an Issue on GitHub. Thanks. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Prem Sichanugrist
2013-Feb-18 20:56 UTC
Re: ActionDispatch::ShowExceptions - rails upgrade 2.3.x to 3.2.x
I think you can have rescue_from in your application controller, and you can render the right response for that. See http://api.rubyonrails.org/classes/ActiveSupport/Rescuable/ClassMethods.html#method-i-rescue_from Also, I thought that RoutingError is already 404: https://github.com/rails/rails/blob/v3.2.12/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#L9 On Monday, February 18, 2013 at 12:09 PM, ROR Architect wrote:> 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. I am using Jruby 1.7.2 and rails 3.2.11 > > Thanks > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com (mailto:rubyonrails-core+unsubscribe@googlegroups.com). > To post to this group, send email to rubyonrails-core@googlegroups.com (mailto:rubyonrails-core@googlegroups.com). > Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.