Sha256: 2208b4690b9018c7481eff07cede63cc2ac63d24c11ed009cdf0e0973b8e2764
Contents?: true
Size: 399 Bytes
Versions: 25
Compression:
Stored size: 399 Bytes
Contents
def update_message_template YAML.load(open('db/fixtures/enju_message/message_templates.yml').read).each do |line| l = line[1].select!{|k, v| %w(status locale title body).include?(k)} template = MessageTemplate.where( status: l["status"], locale: l["locale"] ).first if template template.update_attributes!(l) else MessageTemplate.create!(l) end end end
Version data entries
25 entries across 25 versions & 1 rubygems