Avoid duplicating list of locales

This commit is contained in:
Marko Lovic
2018-08-16 14:27:59 +02:00
committed by Javi Martín
parent 2cb3e4b111
commit 3f277c5cdf
2 changed files with 2 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ class Banner < ActiveRecord::Base
translates :title, touch: true
translates :description, touch: true
globalize_accessors locales: [:en, :es, :fr, :nl, :val, :pt_br]
globalize_accessors locales: I18n.available_locales.map { |l| l.to_s.underscore.to_sym }
validates :title, presence: true,
length: { minimum: 2 }

View File

@@ -8,7 +8,7 @@ class Budget
accepted_content_types: [ "application/pdf" ]
translates :title, :description, touch: true
globalize_accessors locales: [:en, :es, :fr, :nl, :val, :pt_br]
globalize_accessors locales: I18n.available_locales.map { |l| l.to_s.underscore.to_sym }
belongs_to :investment
belongs_to :status, class_name: 'Budget::Investment::Status'