module ApplicationHelper def object_path(object) eval("#{object.class.to_s.underscore}_path(object)") end def object_fields(object) object.attributes.keys end end