Sometimes we need long flash notice message which is unable to handle by rails and yields cookies overflow error to over come this patch with this method.
put this …
before filter :make_session_clear
def make_session_clear
rollback = session.data.clone
reset_session
rollback.each { |k, v| session[k] = v unless k.is_a?(String) && k =~ /^as:/ }
end
That’s it you are up and running…..
Advertisement