app/controllers/application_controller.rb
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def route_not_found
    if params[:format] && params[:format] != "html"
      render :nothing => true, :status => 404
    else
      render :template => 'errors/404', :status => 404
    end
  end
def route_not_found if params [ :format ] && params [ :format ] != "html" render :nothing => true , :status => 404 else render :template => 'errors/404' , :status => 404 end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .