Skip to content

Instantly share code, notes, and snippets.

@petedickson
Created March 22, 2011 16:02
Show Gist options
  • Save petedickson/881471 to your computer and use it in GitHub Desktop.
Save petedickson/881471 to your computer and use it in GitHub Desktop.
%body
.container
- flash.each do |key, value|
= content_tag(:div, value, :class => "flash #{key}")
= yield
= debug(params) if Rails.env.development?
%h1 Login
= form_for :session, :url => sessions_path do |f|
.field
= f.label :username
%br
= f.text_field :username
.field
= f.label :password
%br
= f.password_field :password
.actions
= f.submit "Sign in"
def deny_access
store_location
redirect_to login_path, :flash => { :error => "Oops! You'll need to login before you can access that page." }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment