Custom Login Form Development

Is there a way to specify a Devise authenticator in my user login form? The standard, uninstalled form is unsuitable (no fields, throws exceptions for submitting, actually broke my runtime once.) And it just doesn't look good. I have a 100% useful form that actually logs people, but if an error is made, the standard form appears, there is also no error message. Something like, "When you are asked to submit the login form, render / views / sys / login.html.erb and if it fails, return to that view and enter the error message" NOTE. I have already tried the following, from another question.

devise_for :users, :path => '', :path_names => {:sign_in => "system/login", :sign_out => "logout", :sign_up => "register" } 

and it just overwrites my form

(My /system/ from HTTP receives files from the views directory /sys/ , so http://localhost:3000/system/login will display /views/sys/login.html.erb )

EDIT: A rail application has never been created that uses login or web form authentication (standard HTTP authentication only)

+7
source share
1 answer

You can move project views to your views directory using the following command (from the root of the rails project):

 rails g devise:views 

this will create a devise directory in your app/views/ . There you will receive all of his views, and you can customize him as you wish. To configure the login form, you need to change the sessions/new.html.* . * maybe .erb or .haml or something else

+34
source

All Articles