Skip to content

Commit

Permalink
Fix double render error in dictionary_terms#show
Browse files Browse the repository at this point in the history
  • Loading branch information
wildjcrt committed Sep 10, 2024
1 parent 90b13b9 commit 1f01718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/dictionary_terms_controller.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class DictionaryTermsController < ApplicationController
def show
@dictionary = Dictionary.find_by(id: params[:dictionary_id])
redirect_back(fallback_location: "/") if @dictionary.blank?
return redirect_back(fallback_location: "/") if @dictionary.blank?

@terms = @dictionary.terms.includes(:dictionary, :stem, descriptions: %i[examples synonyms]).where(name: params[:id])
redirect_back(fallback_location: "/") if @terms.empty?
return redirect_back(fallback_location: "/") if @terms.empty?

session[:last_page] = request.url

Expand Down

0 comments on commit 1f01718

Please sign in to comment.