helper_methods 0.0.2 → 0.0.3
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/README.md +12 -0
- data/helper_methods.gemspec +2 -2
- data/lib/helper_methods/version.rb +2 -2
- data/lib/helper_methods.rb +0 -4
- metadata +2 -18
data/README.md
CHANGED
|
@@ -23,6 +23,10 @@ Included helpers:
|
|
|
23
23
|
error_messages_for @resource
|
|
24
24
|
flash_messages
|
|
25
25
|
mobile_device?
|
|
26
|
+
youtube('z8WXgoBGRb4')
|
|
27
|
+
youtube_link('z8WXgoBGRb4')
|
|
28
|
+
icon('th-large icon-white')
|
|
29
|
+
textilize
|
|
26
30
|
|
|
27
31
|
In your forms use:
|
|
28
32
|
|
|
@@ -62,6 +66,14 @@ This will return
|
|
|
62
66
|
<p class="alert alert-error">Your error message</p>
|
|
63
67
|
<p class="alert alert-info">Your info message</p>
|
|
64
68
|
|
|
69
|
+
In your views, use
|
|
70
|
+
|
|
71
|
+
icon('th-large icon-white')
|
|
72
|
+
|
|
73
|
+
This will return
|
|
74
|
+
|
|
75
|
+
<i class="th-large icon-white"></i>
|
|
76
|
+
|
|
65
77
|
Made for twitter-bootstrap.
|
|
66
78
|
|
|
67
79
|
|
data/helper_methods.gemspec
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module HelperMethods
|
|
2
|
-
VERSION = "0.0.
|
|
3
|
-
end
|
|
2
|
+
VERSION = "0.0.3"
|
|
3
|
+
end
|
data/lib/helper_methods.rb
CHANGED
|
@@ -30,10 +30,6 @@ module HelperMethods
|
|
|
30
30
|
link_to "www.youtube.com/watch?v=#{video}", "http://www.youtube.com/watch?v=#{video}", class: 'various fancybox-media'
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
def textilize(text)
|
|
34
|
-
RedCloth.new(text).to_html.html_safe
|
|
35
|
-
end
|
|
36
|
-
|
|
37
33
|
def icon(icon, text="", direction="l")
|
|
38
34
|
return "<i class='icon-#{icon}'></i> #{text}".html_safe if direction == 'l'
|
|
39
35
|
return "#{text} <i class='icon-#{icon}'></i>".html_safe if direction == 'r'
|
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.3
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -10,23 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
date: 2012-09-16 00:00:00.000000000 Z
|
|
13
|
-
dependencies:
|
|
14
|
-
- !ruby/object:Gem::Dependency
|
|
15
|
-
name: RedCloth
|
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
|
-
requirements:
|
|
19
|
-
- - ! '>='
|
|
20
|
-
- !ruby/object:Gem::Version
|
|
21
|
-
version: '0'
|
|
22
|
-
type: :development
|
|
23
|
-
prerelease: false
|
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
-
none: false
|
|
26
|
-
requirements:
|
|
27
|
-
- - ! '>='
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: '0'
|
|
13
|
+
dependencies: []
|
|
30
14
|
description: Helper methods that helps you to DRY
|
|
31
15
|
email:
|
|
32
16
|
- franciscomxs@gmail.com
|