Allow to use model name from I18n ransack scope
This commit is contained in:
parent
3e4b6e34ab
commit
a6d534d097
|
@ -632,6 +632,8 @@ en:
|
|||
end: ends with
|
||||
gt: greater than
|
||||
lt: less than
|
||||
models:
|
||||
person: Passanger
|
||||
attributes:
|
||||
person:
|
||||
name: Full Name
|
||||
|
|
|
@ -59,7 +59,8 @@ module Ransack
|
|||
|
||||
defaults =
|
||||
if key.blank?
|
||||
[:"#{context.klass.i18n_scope}.models.#{i18n_key(context.klass)}"]
|
||||
[:"ransack.models.#{i18n_key(context.klass)}",
|
||||
:"#{context.klass.i18n_scope}.models.#{i18n_key(context.klass)}"]
|
||||
else
|
||||
[:"ransack.associations.#{i18n_key(context.klass)}.#{key}"]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue