Simpler code to get followable object icon.

This commit is contained in:
Senén Rodero Rodríguez
2017-07-18 19:16:48 +02:00
parent 36f9836e68
commit 249641fe23

View File

@@ -56,10 +56,10 @@ module FollowsHelper
end
def entity_icon(entity)
case entity
when "Proposal" then "proposals"
when "Budget::Investment" then "budget"
end
{
proposals: 'Proposal',
budget: 'Budget::Investment'
}.invert[entity]
end
private