diff options
-rw-r--r-- | app/models/favorite.rb | 4 | ||||
-rw-r--r-- | app/models/retweet.rb | 8 | ||||
-rw-r--r-- | app/models/tweet.rb | 12 |
3 files changed, 12 insertions, 12 deletions
diff --git a/app/models/favorite.rb b/app/models/favorite.rb index aeca0e9..e0b8eb7 100644 --- a/app/models/favorite.rb +++ b/app/models/favorite.rb @@ -5,8 +5,8 @@ class Favorite < ActiveRecord::Base def self.from_hash(hash) begin - logger.quietly do - f = create!(tweet_id: hash[:tweet_id], user_id: hash[:user_id]) + f = logger.quietly do + create!(tweet_id: hash[:tweet_id], user_id: hash[:user_id]) end logger.debug("Created Favorite: #{hash[:user_id]} => #{hash[:tweet_id]}") diff --git a/app/models/retweet.rb b/app/models/retweet.rb index 790ebea..05bfd65 100644 --- a/app/models/retweet.rb +++ b/app/models/retweet.rb @@ -5,10 +5,10 @@ class Retweet < ActiveRecord::Base def self.from_hash(hash) begin - logger.quietly do - r = create!(id: hash[:id], - tweet_id: hash[:tweet_id], - user_id: hash[:user_id]) + r = logger.quietly do + create!(id: hash[:id], + tweet_id: hash[:tweet_id], + user_id: hash[:user_id]) end logger.debug("Created Retweet: #{hash[:id]}: #{hash[:user_id]} => #{hash[:tweet_id]}") diff --git a/app/models/tweet.rb b/app/models/tweet.rb index e659c03..7106596 100644 --- a/app/models/tweet.rb +++ b/app/models/tweet.rb @@ -59,12 +59,12 @@ class Tweet < ActiveRecord::Base def self.from_hash(hash) begin - logger.quietly do - t = create!(id: hash[:id], - text: hash[:text], - source: hash[:source], - tweeted_at: hash[:tweeted_at], - user_id: hash[:user_id]) + t = logger.quietly do + create!(id: hash[:id], + text: hash[:text], + source: hash[:source], + tweeted_at: hash[:tweeted_at], + user_id: hash[:user_id]) end logger.debug("Created Tweet: #{hash[:id]}") |