ruby 根据名称确定类Object.const_get一个简单的应用,在header中的,个人信息链应该链接到对应的用户类型的页面上。
ruby 根据名称确定类Object.const_get
<%= link_to "个人信息", Object.const_get(current_user.account_type).find(current_user.account_id) %>