Ruby on Rails Wednesday, April 30, 2014

I've been able to set things up to display a result of queries using
youtube_it gem my current code for fetching that data is

def index
$client = =>
@videos = $client.videos_by(:tags => ['funnyvideo'])

The thing is that I want to allow the user to input what they want to
search instead of me putting in funny video, I want a search bar that
allows users to type in their tags.

My current search bar looks something like this
<% form_tag videos_path, :method 'get' do %>
<%= text_field_tag :search %>
<%= submit_tag "search" %>
<% end %>

How can I pass in whatever the user type into the search bar to fetch
the youtube tags?


Posted via

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment