Class: PhrasingPhrase

Inherits:
ActiveRecord::Base
  • Object
show all
Extended by:
Serialize
Defined in:
app/models/phrasing_phrase.rb

Defined Under Namespace

Modules: Serialize

Class Method Summary collapse

Methods included from Serialize

export_yaml, import_yaml

Class Method Details

.create_phrase(key) ⇒ Object



11
12
13
14
15
16
17
18
# File 'app/models/phrasing_phrase.rb', line 11

def self.create_phrase(key)
  phrasing_phrase = PhrasingPhrase.new
  phrasing_phrase.locale = I18n.locale.to_s
  phrasing_phrase.key = key.to_s
  phrasing_phrase.value = key.to_s
  phrasing_phrase.save!
  phrasing_phrase
end