class DealsController < ApplicationController
before_filter :authenticate_user!, except: [:index, :show, :list]
before_filter :authenticate_proposer, only: [:edit]
rescue_from StandardError, with: :show_errors
rescue_from Order::OrderNotFound, with: :show_errors
protected
def show_errors(exception)
flash[:alert] = exception.message
end
end
Last active
August 29, 2015 14:00
-
-
Save qcam/11471812 to your computer and use it in GitHub Desktop.
Rescue Error in Controller
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment