Dictionary show action for letters, alphabetical links helper

This commit is contained in:
maddiebaka committed 2023-10-20 14:29:34 -04:00
1 parent 6202a6e778
commit c5cbffb4e5
9 files changed
+93 -1

No files matched your search

+5
View File
@@ -3,4 +3,9 @@ class DictionaryController < ApplicationController
@parts_of_speech = PartOfSpeech.all
@words = Word.all
end
def show
@letter = params[:id]
@words = Word.where('substr(word, 1, 1) = ?', @letter)
end
end