diff options
author | Felipe Artur <felipefac@gmail.com> | 2018-04-05 18:28:49 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2018-04-05 20:58:49 +0300 |
commit | 62574be35d5a92c6c825912e1ab9969c5acdb7d9 (patch) | |
tree | 7ae7e6fa40e51a88a8e5e5d543caa59d7632d2b9 /app | |
parent | 22423d284704c3ec2f7715736a75155d14ff413d (diff) |
Fix specs
Diffstat (limited to 'app')
-rw-r--r-- | app/models/milestone.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/milestone.rb b/app/models/milestone.rb index dafae58d121..a66a0015827 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -34,8 +34,8 @@ class Milestone < ActiveRecord::Base scope :for_projects_and_groups, -> (project_ids, group_ids) do conditions = [] - conditions << arel_table[:project_id].in(project_ids) if project_ids.compact.any? - conditions << arel_table[:group_id].in(group_ids) if group_ids.compact.any? + conditions << arel_table[:project_id].in(project_ids) if project_ids&.compact&.any? + conditions << arel_table[:group_id].in(group_ids) if group_ids&.compact&.any? where(conditions.reduce(:or)) end |