Module: BeerDbAdmin::ServiceHelper
- Defined in:
- app/helpers/beer_db_admin/service_helper.rb
Instance Method Summary collapse
- #link_to_bing_search_images(q, opts = {}) ⇒ Object
-
#link_to_flickr_search(q, opts = {}) ⇒ Object
search terms (q).
-
#link_to_flickr_tags(tags, opts = {}) ⇒ Object
browse tags.
- #link_to_google_de_search(q, opts = {}) ⇒ Object
- #link_to_google_search(q, opts = {}) ⇒ Object
- #link_to_google_search_images(q, opts = {}) ⇒ Object
- #link_to_untappd_search(q, opts = {}) ⇒ Object
- #link_to_wikipedia_de_search(q, opts = {}) ⇒ Object
- #link_to_wikipedia_search(q, opts = {}) ⇒ Object
Instance Method Details
#link_to_bing_search_images(q, opts = {}) ⇒ Object
50 51 52 |
# File 'app/helpers/beer_db_admin/service_helper.rb', line 50 def link_to_bing_search_images( q, opts={} ) link_to q, "http://www.bing.com/images/search?q=#{q}", opts end |
#link_to_flickr_search(q, opts = {}) ⇒ Object
search terms (q)
29 30 31 32 33 34 |
# File 'app/helpers/beer_db_admin/service_helper.rb', line 29 def link_to_flickr_search( q, opts={} ) # e.g. use # ottakringer # ottakringer+beer -- note: + is url encoded for space e.g. equals ottakringer beer link_to q, "http://www.flickr.com/search/?q=#{q}", opts end |
#link_to_flickr_tags(tags, opts = {}) ⇒ Object
browse tags
19 20 21 22 23 24 |
# File 'app/helpers/beer_db_admin/service_helper.rb', line 19 def ( , opts={} ) # fix: add alias for link_to_flickr_tag # e.g. use # ottakringer # ottakringer+beer -- use plus for multiple tags link_to , "http://www.flickr.com/photos/tags/#{}", opts end |
#link_to_google_de_search(q, opts = {}) ⇒ Object
41 42 43 |
# File 'app/helpers/beer_db_admin/service_helper.rb', line 41 def link_to_google_de_search( q, opts={} ) link_to q, "https://www.google.de/search?hl=de&q=#{q}", opts end |
#link_to_google_search(q, opts = {}) ⇒ Object
37 38 39 |
# File 'app/helpers/beer_db_admin/service_helper.rb', line 37 def link_to_google_search( q, opts={} ) link_to q, "https://www.google.com/search?q=#{q}", opts end |
#link_to_google_search_images(q, opts = {}) ⇒ Object
46 47 48 |
# File 'app/helpers/beer_db_admin/service_helper.rb', line 46 def link_to_google_search_images( q, opts={} ) link_to q, "https://www.google.com/search?tbm=isch&q=#{q}", opts end |
#link_to_untappd_search(q, opts = {}) ⇒ Object
62 63 64 |
# File 'app/helpers/beer_db_admin/service_helper.rb', line 62 def link_to_untappd_search( q, opts={} ) link_to q, "https://untappd.com/search?q=#{q}", opts end |
#link_to_wikipedia_de_search(q, opts = {}) ⇒ Object
58 59 60 |
# File 'app/helpers/beer_db_admin/service_helper.rb', line 58 def link_to_wikipedia_de_search( q, opts={} ) link_to q, "http://de.wikipedia.org/?search=#{q}", opts end |
#link_to_wikipedia_search(q, opts = {}) ⇒ Object
54 55 56 |
# File 'app/helpers/beer_db_admin/service_helper.rb', line 54 def link_to_wikipedia_search( q, opts={} ) link_to q, "http://en.wikipedia.org/?search=#{q}", opts end |