object_path shouldn't create links to users

This commit is contained in:
Raphael 2010-09-16 14:51:27 -07:00
parent b155d07abd
commit 0eb2c97aef

View file

@ -10,6 +10,7 @@ module ApplicationHelper
end
def object_path(object, opts = {})
object = object.person if object.is_a? User
eval("#{object.class.to_s.underscore}_path(object, opts)")
end