Skip to content

A platform for community discussion. Free, open, simple.

FIX: Use the proper i18n argument name

Loïc Guitauted49f41d92b9
diff --git a/app/models/theme_setting.rb b/app/models/theme_setting.rb
index fa9a9058a06..58221b548d9 100644
--- a/app/models/theme_setting.rb
+++ b/app/models/theme_setting.rb
@@ -54,7 +54,7 @@ class ThemeSetting < ActiveRecord::Base
:json_value,
I18n.t(
"theme_settings.errors.json_value.too_large",
- max_size_megabytes: MAXIMUM_JSON_VALUE_SIZE_BYTES / 1024 / 1024,
+ max_size: MAXIMUM_JSON_VALUE_SIZE_BYTES / 1024 / 1024,
),
)
end
diff --git a/spec/models/theme_setting_spec.rb b/spec/models/theme_setting_spec.rb
index 90e9a1743fa..d1560033530 100644
--- a/spec/models/theme_setting_spec.rb
+++ b/spec/models/theme_setting_spec.rb
@@ -24,7 +24,7 @@ RSpec.describe ThemeSetting do
expect(theme_setting.errors[:json_value]).to contain_exactly(
I18n.t(
"theme_settings.errors.json_value.too_large",
- max_size_megabytes: (bytesize - 1) / 1024 / 1024,
+ max_size: (bytesize - 1) / 1024 / 1024,
),
)
end