diff --git a/app/controllers/dictionary_terms_controller.rb b/app/controllers/dictionary_terms_controller.rb index 74a2fdd..097d79e 100644 --- a/app/controllers/dictionary_terms_controller.rb +++ b/app/controllers/dictionary_terms_controller.rb @@ -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