diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 6994aa17d..e11faaab7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -30,10 +30,7 @@ class ApplicationController < ActionController::Base before_action :accept_terms, if: :logged_in? def render_not_found - respond_to do |format| - format.html { render template: 'errors/not_found', layout: false, status: :not_found } - format.all { head :not_found } - end + render template: 'errors/not_found', layout: false, status: :not_found end protected diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb index 89ec7788b..3fc838849 100644 --- a/app/controllers/invitations_controller.rb +++ b/app/controllers/invitations_controller.rb @@ -87,8 +87,7 @@ def cancel_meeting private def set_invitation - @invitation = Invitation.find_by(token: params[:token]) - raise ActionController::RoutingError, 'Invitation not found' unless @invitation + @invitation = Invitation.find_by!(token: params[:token]) end def load_invitation