首页 > 解决方案 > 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.

标签: ruby-on-railsdevise

解决方案


推荐阅读