mirror of
https://github.com/activerecord-hackery/ransack.git
synced 2022-11-09 13:47:45 -05:00
fix attribute translation for activerecord using STI having with both singular(one) and plural(other) translation keys
This commit is contained in:
parent
9f284cb98a
commit
8460f8f5c8
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue