rails_errors2html 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rails_errors2html.rb +4 -3
- data/rails_errors2html.gemspec +1 -1
- metadata +1 -1
data/lib/rails_errors2html.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Errors2Html
|
2
|
-
VERSION = '1.4.
|
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
|
52
|
+
errors.global.push(message).uniq!
|
52
53
|
else
|
53
|
-
(errors.fields[key] ||= []).push(message
|
54
|
+
(errors.fields[key] ||= []).push(message).uniq!
|
54
55
|
end
|
55
56
|
end
|
56
57
|
end
|
data/rails_errors2html.gemspec
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
Gem::Specification::new do |spec|
|
5
5
|
spec.name = "rails_errors2html"
|
6
|
-
spec.version = "1.4.
|
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 %>"
|