Commit 79fd7367 authored by Jarka Kadlecová's avatar Jarka Kadlecová

Change case when to guard clause

parent caad256c
......@@ -8,10 +8,9 @@ class Groups::TodosController < Groups::ApplicationController
def issuable
strong_memoize(:epic) do
case params[:issuable_type]
when "epic"
@group.epics.find_by(id: params[:issuable_id])
end
next if params[:issuable_type] != 'epic'
@group.epics.find_by(id: params[:issuable_id])
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment