Created
March 9, 2012 00:06
-
-
Save keade/2004257 to your computer and use it in GitHub Desktop.
Lost in Twitter Searching
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="container"> | |
| <div class="row"> | |
| <div class="span9"> | |
| <h6>@Twitter Name</h6> | |
| <%= form_tag pages_path, method: :get do %> | |
| <%= text_field_tag :search, params[:search] %> | |
| <%= submit_tag "Search", name: nil %> | |
| <% end %> | |
| </div> | |
| <div class="span3"> | |
| <h6>recently trucked</h6> | |
| </div> | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PagesController < ApplicationController | |
| require 'twitter' | |
| respond_to :json, :html | |
| def index | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Tweets < Twitter::Status | |
| require 'twitter' | |
| def search | |
| @tweets = Twitter.search('#hashtag', :rpp => 3).map do |status| | |
| "#{status.from_user}: #{status.text}" | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment