2023-10-13 00:02:22 +00:00
|
|
|
class DictionaryController < ApplicationController
|
|
|
|
def index
|
2023-12-06 20:53:25 +00:00
|
|
|
@english = Language.where(name: "English")
|
|
|
|
@parts_of_speech = PartOfSpeech.where(language_id: @english)
|
|
|
|
|
|
|
|
@parts_of_speech.each do |pos|
|
|
|
|
pos.translations.build
|
|
|
|
end
|
|
|
|
|
2023-10-13 02:24:31 +00:00
|
|
|
@words = Word.all
|
2023-10-13 00:02:22 +00:00
|
|
|
end
|
2023-10-20 18:29:34 +00:00
|
|
|
|
|
|
|
def show
|
|
|
|
@letter = params[:id]
|
|
|
|
@words = Word.where('substr(word, 1, 1) = ?', @letter)
|
|
|
|
end
|
2023-10-13 00:02:22 +00:00
|
|
|
end
|