Change string manipulation to use interpolation for readability
This commit is contained in:
@@ -14,11 +14,11 @@ module TranslatableFormHelper
|
||||
|
||||
def merge_translatable_field_options(options, locale)
|
||||
options.merge(
|
||||
class: (options.fetch(:class, "") + " js-globalize-attribute"),
|
||||
class: "#{options[:class]} js-globalize-attribute".strip,
|
||||
style: display_translation?(locale),
|
||||
data: options.fetch(:data, {}).merge(locale: locale),
|
||||
label_options: {
|
||||
class: (options.fetch(:class, "") + " js-globalize-attribute"),
|
||||
class: "#{options[:class]} js-globalize-attribute".strip,
|
||||
style: display_translation?(locale),
|
||||
data: (options.dig(:label_options, :data) || {}) .merge(locale: locale)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user