Skip to content

Instantly share code, notes, and snippets.

@Will-Sommers
Created March 5, 2012 15:39
Show Gist options
  • Save Will-Sommers/1978874 to your computer and use it in GitHub Desktop.
Save Will-Sommers/1978874 to your computer and use it in GitHub Desktop.
Signin Error
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