Module: LetMeGoogleThatForYouHelper::ViewHelpers
- Defined in:
- lib/lmgtfy_helper/view_helpers.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.something_to_test(number) ⇒ Object
18 19 20 |
# File 'lib/lmgtfy_helper/view_helpers.rb', line 18 def self.something_to_test number number.zero? ? true : false end |
Instance Method Details
#link(phrase) ⇒ Object
14 15 16 |
# File 'lib/lmgtfy_helper/view_helpers.rb', line 14 def link phrase "http://lmgtfy.com/?q=#{phrase}" end |
#lmgtfy_button(phrase, label = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/lmgtfy_helper/view_helpers.rb', line 4 def phrase, label = nil if label.present? link_to label, link(phrase), class: 'btn btn-large lmgtfy-btn' else link_to 'Let me google that for you...', link(phrase), class: 'btn btn-large lmgtfy-btn' end end |