def load_forums
case current_user.type
when "Admin"
cond = {}
when "Owner"
cond = {:forum_for => [1,3]}
when "Provider"
cond = {:forum_for => [2,3]}
else
cond = {:forum_for => [3]}
end
Forum.all(:conditions => cond)
end
Refactorings
No refactoring yet !
Is there easy and clever way to generate :conditions hash depending from user type?