ruby on rails - How to rescue_from ActionDispatch::Cookie::CookieOverflow? -
first @ all, have read:
cookie overflow in rails application?
and not problem i'm facing.
i'm working with:
gem "rails", "~> 3.2.11"
and
ruby 1.9.3-p125
i'm trying process search, , when search tooooooo big error:
actiondispatch::cookies::cookieoverflow
i rescue_form error in applicationcontroller seems not working me:
rescue_from actiondispatch::cookies::cookieoverflow :with => :render_404
where:
def render_404 respond_to |r| r.html { render :template => "something/404", :status => 404} r.all { render :nothing => true, :status => 404 } end true end
any going received.
rescue_from actiondispatch::cookies::cookieoverflow :with => :render_404
you missing comma (,) in arguments , according docs
with correc syntax
rescue_from actiondispatch::cookies::cookieoverflow, with: :render_404
rescue_from receives series of exception classes or class names, , trailing :with option name of method
see more: http://api.rubyonrails.org/v5.0/classes/activesupport/rescuable/classmethods.html
Comments
Post a Comment