session creation

This commit is contained in:
Karol Selak 2021-03-20 20:02:37 +01:00
parent 0b2bd70f16
commit f8093d2c09
9 changed files with 63 additions and 3 deletions

View file

@ -1,2 +1,8 @@
<h1>Sessions#new</h1>
<p>Find me in app/views/sessions/new.html.erb</p>
<h1>Login</h1>
<%= form_tag '/login' do %>
<%= label_tag :username%>
<%= text_field_tag :username %>
<%= label_tag :password%>
<%= password_field_tag :password%>
<%= submit_tag "Login"%>
<%end%>

View file

@ -1,3 +1,6 @@
<h1>Welcome</h1>
<% if logged_in? %>
<h1>You are Logged In, <%= current_user.username %></h1>
<%end%>
<%= button_to "Login", '/login', method: :get%>
<%= button_to "Sign Up", '/users/new', method: :get%>