Add Language model and LanguageController
This commit is contained in:
1 parent
ed00e69a13
commit
206c4da31f
28 files changed
+298
-18
No files matched your search
@@ -1,3 +1,4 @@
|
||||
class Definition < ApplicationRecord
|
||||
belongs_to :word
|
||||
belongs_to :language
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class Language < ApplicationRecord
|
||||
has_many :definitions
|
||||
has_many :part_of_speeches
|
||||
|
||||
validates_presence_of :name
|
||||
end
|
||||
@@ -1,2 +1,3 @@
|
||||
class PartOfSpeech < ApplicationRecord
|
||||
belongs_to :language
|
||||
end
|
||||
Reference in new issue
Block a user