--Implementing login function with gem'devise' --Registered with mail: guest @ guest, password: 111111 for new registration
<%= form_with(model: User.new, url:new_user_session_path) do |f| %>
<%= f.hidden_field :email, value: "guest@guest" %>
<%= f.hidden_field :password, value: "111111" %>
<%= f.submit "Guest login", class:"btn btn-success btn-sm mb-3 btn-block guest"%>
<% end %>
When guest login is clicked, it goes to the login screen and Enter email and password in value You will be redirected to the login screen.
Recommended Posts