Created
March 5, 2012 15:39
-
-
Save Will-Sommers/1978874 to your computer and use it in GitHub Desktop.
Signin Error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
routes.db | |
Second::Application.routes.draw do | |
resources :users | |
resources :sessions, only: [:new, :create, :destroy] | |
match '/signup', to: 'users#new' | |
match '/signin', to: 'sessions#new' | |
match '/signout', to: 'sessions#destroy', via: :delete | |
match '/help', to: 'static_pages#help' | |
match '/about', to: 'static_pages#about' | |
match '/contact', to: 'static_pages#contact' | |
/layout/sessions/new.html.erb | |
<% provide :title, "Sign in" %> | |
<h1>Sign in</h1> | |
<%= form_for(:session, url: sessions_path) do |f| %> | |
<div class="field"> | |
<%= f.label :email %><br /> | |
<%= f.text_field :email %> | |
</div> | |
<div class="field"> | |
<%= f.label :password %><br /> | |
<%= f.password_field :password %> | |
</div> | |
<div class="actions"> | |
<%= f.submit "Sign in" %> | |
</div> | |
<% end %> | |
<p>New user? <%= link_to "Sign up now!" , signup_path %></p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment