Skip to content

Commit

Permalink
Reintroduce taking the first element of the where query
Browse files Browse the repository at this point in the history
This was somehow dropped during the rubocop alignment
  • Loading branch information
TheWalkingLeek committed Dec 17, 2024
1 parent 315b41d commit 475040c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/iwi/groups_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ def parent_in_ch_open_or_tcbe(group)
end

def parent_in_ch_open(group)
parent = ::Group.where(id: group.object[:parent_id])
parent = ::Group.where(id: group.object[:parent_id]).try(:[], 0)
parent.try(:[], :type) == "Group::TopLayerChOpenMembers"
end

def parent_in_tcbe(group)
parent = ::Group.where(id: group.object[:parent_id])
parent = ::Group.where(id: group.object[:parent_id]).try(:[], 0)
parent.try(:[], :type) == "Group::TopLayerTcbeChMembers"
end

Expand Down

0 comments on commit 475040c

Please sign in to comment.