Created
March 22, 2011 16:02
-
-
Save petedickson/881471 to your computer and use it in GitHub Desktop.
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
%body | |
.container | |
- flash.each do |key, value| | |
= content_tag(:div, value, :class => "flash #{key}") | |
= yield | |
= debug(params) if Rails.env.development? |
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
%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" |
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
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