diff --git a/core/app/views/refinery/admin/_error_messages.html.erb b/core/app/views/refinery/admin/_error_messages.html.erb index febb6a6dab..2e2fef12ed 100644 --- a/core/app/views/refinery/admin/_error_messages.html.erb +++ b/core/app/views/refinery/admin/_error_messages.html.erb @@ -7,8 +7,8 @@
  • <%= value %>
  • <% end %> <% else %> - <% object.errors.each do |key, value| %> -
  • <%= value %>
  • + <% object.errors.each do |error| %> +
  • <%= error.message %>
  • <% end %> <% end %> diff --git a/images/lib/refinery/images/validators/image_size_validator.rb b/images/lib/refinery/images/validators/image_size_validator.rb index ecfdd589cc..8e6dab159d 100644 --- a/images/lib/refinery/images/validators/image_size_validator.rb +++ b/images/lib/refinery/images/validators/image_size_validator.rb @@ -7,9 +7,9 @@ def validate(record) image = record.image if image.respond_to?(:length) && image.length > Images.max_image_size - record.errors[:image] << ::I18n.t('too_big', - :scope => 'activerecord.errors.models.refinery/image', - :size => Images.max_image_size) + record.errors.add(:image, message: ::I18n.t('too_big', + scope: 'activerecord.errors.models.refinery/image', + size: Images.max_image_size)) end end