Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Readme change (Login) #305

Merged
merged 2 commits into from

2 participants

@mindbreaker

Change the Login View to Rails 3.

@binarylogic binarylogic merged commit 958c141 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 2 deletions.
  1. +11 −2 README.rdoc
View
13 README.rdoc
@@ -174,8 +174,17 @@ What if your user sessions controller could look just like your other controller
As you can see, this fits nicely into the RESTful development pattern. What about the view...
- <% form_for @user_session do |f| %>
- <%= f.error_messages %>
+ <%= form_for @user_session do |f| %>
+ <% if @user_session.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@user_session.errors.count, "error") %> prohibited:</h2>
+ <ul>
+ <% @user_session.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
<%= f.label :login %><br />
<%= f.text_field :login %><br />
<br />
Something went wrong with that request. Please try again.