rails_errors2html 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Errors2Html
2
- VERSION = '1.4.1'
2
+ VERSION = '1.4.2'
3
3
 
4
4
  def Errors2Html.version
5
5
  Errors2Html::VERSION
@@ -46,11 +46,12 @@ module Errors2Html
46
46
  flatten(e).each do |key, messages|
47
47
  Array(messages).each do |message|
48
48
  at_least_one_error = true
49
+ message = message.to_s.html_safe
49
50
 
50
51
  if Array(key).join =~ /\A(?:[*]|base)\Z/iomx
51
- errors.global.push(message.to_s).uniq!
52
+ errors.global.push(message).uniq!
52
53
  else
53
- (errors.fields[key] ||= []).push(message.to_s).uniq!
54
+ (errors.fields[key] ||= []).push(message).uniq!
54
55
  end
55
56
  end
56
57
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "rails_errors2html"
6
- spec.version = "1.4.1"
6
+ spec.version = "1.4.2"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "rails_errors2html"
9
9
  spec.description = "<%= form_for @post do %> <%= @post.errors.to_html %>"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_errors2html
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: