Skip to content

Commit

Permalink
Uses :peoples last names to create :references
Browse files Browse the repository at this point in the history
  • Loading branch information
aceofbassgreg committed Jan 29, 2016
1 parent d109dc7 commit e5f7106
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/services/twitter/importer.rb
Expand Up @@ -40,6 +40,12 @@ def store_all_data_from(tweet_data)
TweetTopic.create(tweet_id: tweet_record.id, topic_id: topic.id)
end
end

Person.all.each do |person|
if !!tweet_text.match((Regexp.new(Regexp.escape(person.last), Regexp::IGNORECASE)))
Reference.create(tweet_id: tweet_record.id, person_id: person.id)
end
end
rescue
binding.pry
end
Expand Down

0 comments on commit e5f7106

Please sign in to comment.