Add Language model and LanguageController

This commit is contained in:
maddiebaka
2023-10-24 23:47:01 -04:00
parent ed00e69a13
commit 206c4da31f
28 changed files with 298 additions and 18 deletions

View File

@@ -2,6 +2,7 @@ FactoryBot.define do
factory :definition do
pos { "n" }
definition { "this is a definition" }
language_id { FactoryBot.create(:language).id }
word_id { FactoryBot.create(:word).id }
end
end

View File

@@ -0,0 +1,5 @@
FactoryBot.define do
factory :language do
name { "MyString" }
end
end

View File

@@ -1,6 +1,7 @@
FactoryBot.define do
factory :part_of_speech do
sequence(:pos) { |n| "test-#{n.to_s}" }
language_id { FactoryBot.create(:language).id }
definition { "test definition" }
end
end