ruby-on-rails - Making a duplicate Devise sign in page on Rails?
问题描述
Trying to make a duplicate sign in page with Devise (exact same functionality, just a frontend redesign of the layout; AB testing) and I thought I could do something like (routes.rb):
devise_scope :user do
get '/users/sign_up_1' => 'registrations#new_v1'
end
new_v1.html.erb
being in my registrations folder alongside Devise's new.html.erb
(new_v1.html.erb
being a clone of new.html.erb
with some extra code for the redesign). While users/sign_up is the default for Devise and functions correctly (routes.rb):
devise_for :users,
:controllers: { registrations: 'registrations' }
sign_up_1 gives "First argument in form cannot be nil or be empty"
All I need is a new URL with the exact same functionality as the Devise sign up page, but with a different design. I'm thinking I am overlooking something simple. Thanks for the help.
解决方案
推荐阅读
- javascript - 单个列搜索文本输入角度
- javascript - 根据条件着色单元格
- typescript - 是否可以为输入是对象的可区分联合编写类型安全函数,该对象的键可区分其对应值
- mysql - MYSQL 试图返回重复值
- r - 寻找移位指数分布的起始值的问题
- python - 通过移动字母在数组中复制零以腾出空间
- sql - 使用特定代码选择不存在的数字
- javascript - 如何在 reactjs 中提供静态文件?
- c# - How can I read migrations files at runtime and apply them to my database in EF Core?
- mysql - Mysql查询用子句从另一个表中的值中减去表中列的总和