3
我试图让用户在未登录的情况下提交预订请求。提交后,未提示用户提示登录或注册。注册后,我想要提交表单并将(新注册的)用户带到结帐页面。设计登录后提交表单
商店位置保持最后一页在登录后返回用户。我需要通过提交形式和它们放置到结帐页面上找出如何继续他们的预期路径在用户注册后/迹象。
def store_location
#stores the last url. Used for post-login redirects to what the user was trying to do last.
if (!request.fullpath.match("https://stackoverflow.com/users/") && !request.xhr?) # don't store ajax calls
session[:previous_url] = request.fullpath
end
end
你的做法是正确的,但我得到这个错误: 'NameError在设计:: SessionsController#创建 未初始化的常量的预订:: CreateBooking' –