search for: twitter_nam

Displaying 1 result from an estimated 1 matches for "twitter_nam".

Did you mean: twitter_name
2009 Sep 19
0
Merging API data and ActiveRecord data for display in the view...
...my controller for retrieving the data: @diary = current_user.diary(params[:page]) start_date = @diary.first.created_at.to_s(:date_query) end_date = @diary.last.created_at.to_s(:date_query) @tweets = JSON.parse(Net::HTTP.get(URI.parse("http:// search.twitter.com/search.json?from=#{current_user.twitter_name} &since=#{start_date}&until=#{end_date}"))) @tweets = @tweets[''results''] @blend = @diary.entries.concat(@tweets) # tried something like this... Not sure this is the best way to go What’s the best way to merge these two results and sort them by ''created_at f...