Skip to content

Commit

Permalink
Merge branch 'filter-error'
Browse files Browse the repository at this point in the history
  • Loading branch information
Torsten Braun committed Dec 10, 2015
2 parents fcb1436 + 0adb3b6 commit d2648c4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/concerns/tt_query_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ def sql_for_tt_start_date_field(field, operator, value)
end

def sql_for_tt_user_field(field, operator, value)
if value.delete('me')
value += User.current.id.to_s.to_a
end
value << User.current.id.to_s if value.delete('me')

"( #{User.table_name}.id #{operator == "=" ? 'IN' : 'NOT IN'} (" + value.collect { |val| "'#{self.class.connection.quote_string(val)}'" }.join(",") + ") )"
end

Expand Down

0 comments on commit d2648c4

Please sign in to comment.