how to authenticate user and password using ruby on rails -


How to authenticate user names and passwords using ruby ​​on Rail

If my authentication is correct then I need to visit some other page sample code of login.html.erb :

   

Hello, : Valid = & gt; Correct | f |% & gt; & Lt; TR & gt; & Lt; Td> & Lt; B & gt; Student registration no & lt; Sup> * & Lt; / Sup> & Lt; / B & gt; & Lt; / Td> & Lt; Td> & Lt;% = text_field: user ,: name, placeholder = & gt; "Reg.No"% & gt; & Lt;% = @ user.errors.on (: name)% & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; P & gt; Password & lt; / P & gt; & Lt; / TD & gt; & Lt; Td> & Lt;% = text_field: User ,: Password: Placeholder = & gt; "Password"%> & Lt;% = @ user.errors.on (: password)% & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> & Lt; B & gt; & Lt;% = submit_tag "Submit"%> & Lt; / B & gt; & Lt; / Td> & Lt; Td> & Lt; B & gt; & Lt; Input type = "reset" name = "cancel" /> gt; & Lt; / B & gt; & Lt; / Td> & Lt; / TR & gt; & Lt;% end% & gt;

Please refer to this video

Authentication from scratch == & gt;

or

Use devise gem for authentication

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -