helper_methods 0.0.16 → 0.0.17
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 +1 -0
- data/lib/helper_methods/version.rb +1 -1
- data/lib/helper_methods.rb +12 -2
- metadata +2 -2
data/README.md
CHANGED
data/lib/helper_methods.rb
CHANGED
@@ -65,7 +65,7 @@ module HelperMethods
|
|
65
65
|
request.user_agent =~ /Mobile|webOS/
|
66
66
|
end
|
67
67
|
|
68
|
-
def
|
68
|
+
def youtube_videop(video, width = 580, height = 420)
|
69
69
|
"<iframe width='#{width}' height='#{height}' src='http://www.youtube.com/embed/#{video}' frameborder='0' allowfullscreen></iframe>".html_safe
|
70
70
|
end
|
71
71
|
|
@@ -73,11 +73,21 @@ module HelperMethods
|
|
73
73
|
link_to "www.youtube.com/watch?v=#{video}", "http://www.youtube.com/watch?v=#{video}", class: 'various fancybox-media'
|
74
74
|
end
|
75
75
|
|
76
|
-
def
|
76
|
+
def bootstrap_icon(icon, text="", direction="l")
|
77
77
|
return "<i class='icon-#{icon}'></i> #{text}".html_safe if direction == 'l'
|
78
78
|
return "#{text} <i class='icon-#{icon}'></i>".html_safe if direction == 'r'
|
79
79
|
end
|
80
80
|
|
81
|
+
def bootstrap_label(text, name="")
|
82
|
+
name = "label-#{name}" unless name.nil?
|
83
|
+
return %(<span class="label #{name}">#{text}</span>).html_safe
|
84
|
+
end
|
85
|
+
|
86
|
+
def bootstrap_badge(text, name="")
|
87
|
+
name = "badge-#{name}" unless name.nil?
|
88
|
+
return %(<span class="badge #{name}">#{text}</span>).html_safe
|
89
|
+
end
|
90
|
+
|
81
91
|
def active_link_to(*args, &block)
|
82
92
|
if block_given?
|
83
93
|
name = capture(&block)
|
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.17
|
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: 2013-06-
|
12
|
+
date: 2013-06-20 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A small collection of simple methods
|
15
15
|
email:
|