Class: Treng::Word
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Treng::Word
- Defined in:
- lib/treng/db.rb
Class Method Summary collapse
Class Method Details
.add_word(eng, chs) ⇒ Object
6 7 8 9 10 |
# File 'lib/treng/db.rb', line 6 def self.add_word(eng, chs) find_or_create_by(:eng => eng) do |word| word.chs = chs end end |