helper_methods 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/helper_methods.gemspec +1 -1
- data/lib/helper_methods/version.rb +1 -1
- data/lib/helper_methods.rb +4 -2
- metadata +3 -3
data/helper_methods.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.version = HelperMethods::VERSION
|
9
9
|
gem.authors = ["Francisco Martins"]
|
10
10
|
gem.email = ["franciscomxs@gmail.com"]
|
11
|
-
gem.description = "
|
11
|
+
gem.description = "There are a small collection of simple methods"
|
12
12
|
gem.summary = "Helper methods that helps you to DRY"
|
13
13
|
gem.homepage = "https://github.com/franciscomxs/helper_methods"
|
14
14
|
|
data/lib/helper_methods.rb
CHANGED
@@ -8,13 +8,15 @@ module HelperMethods
|
|
8
8
|
content_tag :li, value
|
9
9
|
end.join
|
10
10
|
|
11
|
-
%(<ul class="#{css_class}">#{error_list}</ul>).html_safe
|
11
|
+
%(<ul data-dismiss="alert" class="#{css_class}">#{error_list}</ul>).html_safe
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
15
|
def flash_messages
|
16
16
|
flash.collect do |key, value|
|
17
|
-
|
17
|
+
close_icon = %(<a class="close" data-dismiss="alert" href="#">×</a>).html_safe
|
18
|
+
content = close_icon + value
|
19
|
+
content_tag(:p, content, :class => "alert alert-#{key}", :data => { :dismiss => "alert"} ) unless [true, false, nil].include? value
|
18
20
|
end.join.html_safe
|
19
21
|
end
|
20
22
|
|
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.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,9 +9,9 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-24 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description:
|
14
|
+
description: There are a small collection of simple methods
|
15
15
|
email:
|
16
16
|
- franciscomxs@gmail.com
|
17
17
|
executables: []
|