Raise 404 in controller
To raise a 404 in a controller:
raise ActionController::RoutingError, 'Not Found'
If a record is accessed and not found, use ActiveRecord::RecordNotFound.
To raise a 404 in a controller:
raise ActionController::RoutingError, 'Not Found'
If a record is accessed and not found, use ActiveRecord::RecordNotFound.