Skip to content

Commit 50d9a32

Browse files
authored
Merge pull request #2519 from codebar/fix-token-error
Update the default method when rendering a 404
2 parents 972c892 + 3eeca62 commit 50d9a32

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

app/controllers/application_controller.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ class ApplicationController < ActionController::Base
3030
before_action :accept_terms, if: :logged_in?
3131

3232
def render_not_found
33-
respond_to do |format|
34-
format.html { render template: 'errors/not_found', layout: false, status: :not_found }
35-
format.all { head :not_found }
36-
end
33+
render template: 'errors/not_found', layout: false, status: :not_found
3734
end
3835

3936
protected

app/controllers/invitations_controller.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ def cancel_meeting
8787
private
8888

8989
def set_invitation
90-
@invitation = Invitation.find_by(token: params[:token])
91-
raise ActionController::RoutingError, 'Invitation not found' unless @invitation
90+
@invitation = Invitation.find_by!(token: params[:token])
9291
end
9392

9493
def load_invitation

0 commit comments

Comments
 (0)