Files
nairobi/app/models/i18n_content.rb
2018-07-26 19:06:29 -04:00

12 lines
297 B
Ruby

class I18nContent < ActiveRecord::Base
scope :by_key, -> (key){ where(key: key) }
scope :begins_with_key, -> (key){ where("key ILIKE ?", "#{key}?%") }
validates :key, uniqueness: true
translates :value, touch: true
globalize_accessors locales: [:en, :es, :fr, :nl, :val, :pt_br]
end