From 9867c4978d0bed29f37efdf4942de22b9e0d3650 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 22 Feb 2012 16:06:41 +0100 Subject: [PATCH 1/2] Change login-view to Rails 3 in readme --- README.rdoc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.rdoc b/README.rdoc index 737ba0a9..1fc30be9 100644 --- a/README.rdoc +++ b/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? %> +
+

<%= pluralize(@user_session.errors.count, "error") %> prohibited this post from being saved:

+ +
+ <% end %> <%= f.label :login %>
<%= f.text_field :login %>

From eba5bebe47e3ada06668f06d9c27189782bd054f Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 22 Feb 2012 16:09:28 +0100 Subject: [PATCH 2/2] Change login-view to Rails 3 in readme --- README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 1fc30be9..07505135 100644 --- a/README.rdoc +++ b/README.rdoc @@ -177,7 +177,7 @@ As you can see, this fits nicely into the RESTful development pattern. What abou <%= form_for @user_session do |f| %> <% if @user_session.errors.any? %>
-

<%= pluralize(@user_session.errors.count, "error") %> prohibited this post from being saved:

+

<%= pluralize(@user_session.errors.count, "error") %> prohibited:

    <% @user_session.errors.full_messages.each do |msg| %>
  • <%= msg %>