Merge pull request #432 from cubus/master

ActiveRecord I18n with singular+plural translation keys
This commit is contained in:
Jon Atack 2014-09-22 18:31:15 +02:00
commit ba7d9f8aec
1 changed files with 3 additions and 2 deletions

View File

@ -135,8 +135,9 @@ module Ransack
end
def self.translated_attribute(associated_class)
"#{associated_class.i18n_scope}.attributes.#{
i18n_key(associated_class)}.#{@attr_name}".to_sym
key = "#{associated_class.i18n_scope}.attributes.#{
i18n_key(associated_class)}.#{@attr_name}"
["#{key}.one".to_sym, key.to_sym]
end
def self.translated_ancestor_attributes