helper_methods 0.0.8 → 0.0.9
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/helper_methods/version.rb +1 -1
- data/lib/helper_methods.rb +4 -2
- metadata +2 -2
data/lib/helper_methods.rb
CHANGED
@@ -5,10 +5,12 @@ module HelperMethods
|
|
5
5
|
def error_messages_for(resource, css_class = "alert alert-error")
|
6
6
|
if resource.errors.any?
|
7
7
|
error_list = resource.errors.collect do |key, value|
|
8
|
-
|
8
|
+
content = %(<a class="close" data-dismiss="alert" href="#">×</a>)
|
9
|
+
content += value
|
10
|
+
content_tag :div, content.html_safe, class: css_class, data: { dismiss: "alert" }
|
9
11
|
end.join
|
10
12
|
|
11
|
-
|
13
|
+
error_list.html_safe
|
12
14
|
end
|
13
15
|
end
|
14
16
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: helper_methods
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-26 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: There are a small collection of simple methods
|
15
15
|
email:
|