【发布时间】:2016-01-05 11:15:00
【问题描述】:
我有两个设计模型,即user 和technician。我希望technicians 在他们登录时被定向到特定页面,因此我根据设计教程实现了它并将其放入应用程序控制器中
def after_sign_in_path_for(resource)
case resource.class
when technician
new_services_path
when user
root_path
end
end
但我收到此错误。 [![在此处输入图像描述][1]][1] 我在这里错过了什么?
【问题讨论】:
-
@raj 感谢您的帮助,但是当我实施建议未定义方法
technician_url' for #<Devise::SessionsController:0x007fd2ccabbb10>if options.empty? recipient.send(method, *args) else recipient.send(method, *args, options) end` -
酷,我明白你的意思,但是,你应该遵循 SO 的隔离原则。我觉得原来的问题已经回答了。你应该继续接受这个问题的答案。然后发布另一个问题。您也可以在此处发布新问题的链接,以便我们更好地帮助您和社区
标签: ruby-on-rails ruby ruby-on-rails-3 devise