Skip to content

Commit

Permalink
got search working again, updated to the latest twitter_oauth gem
Browse files Browse the repository at this point in the history
  • Loading branch information
moomerman committed Dec 29, 2009
1 parent 08c0400 commit c591b83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions sinitter.rb
Expand Up @@ -43,8 +43,8 @@
end

get '/search' do
query = params[:q] || ''
@search = @client.search(query, :page => params[:page])
params[:q] ||= 'sinitter OR twitter_oauth'
@search = @client.search(params[:q], :page => params[:page], :per_page => params[:per_page])
erb :search
end

Expand Down
10 changes: 5 additions & 5 deletions views/_results.erb
@@ -1,14 +1,14 @@
<div class="timeline">
<% @search.results.each do |result| %>
<% @search['results'].each do |result| %>
<p>
<div style="float:left; margin:5px">
<a href="http://twitter.com/<%= result.from_user %>">
<img src="<%= result.profile_image_url %>" width="48" height="48"/>
<a href="http://twitter.com/<%= result['from_user'] %>">
<img src="<%= result['profile_image_url'] %>" width="48" height="48"/>
</a>
</div>
<div style="">
<a href="http://twitter.com/<%= result.from_user %>">@<%= result.from_user %></a>
<%= result.text %>
<a href="http://twitter.com/<%= result['from_user'] %>">@<%= result['from_user'] %></a>
<%= result['text'] %>
</div>
<br clear="all"/>
</p>
Expand Down

0 comments on commit c591b83

Please sign in to comment.