From ddd2162ec113583d70fb7393f8391350f799a612 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Fri, 3 Jul 2015 17:26:30 +0200 Subject: [PATCH] Applied rubocop cop 'Style/SpaceBeforeBlockBraces'. --- app/models/channel/twitter.rb | 2 +- lib/models.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/channel/twitter.rb b/app/models/channel/twitter.rb index 548c49032..e57f9453c 100644 --- a/app/models/channel/twitter.rb +++ b/app/models/channel/twitter.rb @@ -50,7 +50,7 @@ class Channel::Twitter Rails.logger.debug " - searching for '#{search[:term]}'" counter = 0 - @tweet.client.search( search[:term], result_type: result_type ).collect{ |tweet| + @tweet.client.search( search[:term], result_type: result_type ).collect { |tweet| break if search[:limit] && search[:limit] <= counter break if Ticket::Article.find_by( message_id: tweet.id.to_s ) diff --git a/lib/models.rb b/lib/models.rb index 2d812e11b..a676f901f 100644 --- a/lib/models.rb +++ b/lib/models.rb @@ -94,7 +94,7 @@ returns # find relations via reflections list.each {|model_class, model_attributes| next if !model_attributes[:reflections] - model_attributes[:reflections].each{|reflection_key, reflection_value| + model_attributes[:reflections].each {|reflection_key, reflection_value| next if reflection_value.macro != :belongs_to if reflection_value.options[:class_name] == object_name count = model_class.where("#{reflection_value.name}_id = ?", object_id).count