【发布时间】:2011-11-01 23:40:59
【问题描述】:
我需要以这样的方式覆盖设计,当用户注册或登录时将他重定向到show_home_url 而不是root_path(home#index)。但我不确定after_sign_up_path_for 或after_inactive_sign_up_path_for 是我需要的。还有任何选择,任何人都可以告诉我如何实现它吗?我是 ruby 的初学者。这里是 Devise registration controller 非常感谢。
class RegistrationsController < Devise::RegistrationsController
def after_inactive_sign_up_path_for( resource)
end
def after_sign_up_path_for(resource)
end
end
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 devise ruby-on-rails-3.1