Skip to content
Browse files

Trying to fix fixnum error

  • Loading branch information...
1 parent d3c232d commit 651383a823df5eb1d2a7c8b252be981d198e6953 @rbin rbin committed Dec 13, 2012
Showing with 5 additions and 2 deletions.
  1. +3 −0 TwitterHipster/app/helpers/application_helper.rb
  2. +2 −2 TwitterHipster/app/models/tweet.rb
View
3 TwitterHipster/app/helpers/application_helper.rb
@@ -1,2 +1,5 @@
module ApplicationHelper
+ def display_content_with_links(tweet)
+ tweet.content.gsub(/(http:\/\/[a-zA-Z0-9\/\.\+\-_:?&=]+)/) {|a| "<a href=\"#{a}\">#{a}</a>"}
+ end
end
View
4 TwitterHipster/app/models/tweet.rb
@@ -13,9 +13,9 @@ def self.get_latest
tweets = client.statuses.user_timeline? :screen_name => HIPSTER # hit the API
tweets.each do |t|
created = DateTime.parse(t.created_at)
- #unless Tweet.exists?(["created=?", created.to_i])
+ unless Tweet.exists?(["created=?", created.to_i])
Tweet.create({:content => t.text, :created => created.to_i })
- #end
+ end
end
end

0 comments on commit 651383a

Please sign in to comment.
Something went wrong with that request. Please try again.