From b95d6e84b00bd926b1118f6a820eca7a870b8c35 Mon Sep 17 00:00:00 2001
From: Santiago Pastorino
Date: Sat, 14 Aug 2010 02:13:00 -0300
Subject: Deletes trailing whitespaces (over text files only find * -type f
-exec sed 's/[ \t]*$//' -i {} \;)
---
railties/guides/source/getting_started.textile | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
(limited to 'railties/guides/source/getting_started.textile')
diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index ffb0310816..270fbe76d2 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -475,13 +475,13 @@ After the console loads, you can use it to work with your application's models:
>> p = Post.new(:content => "A new post")
-=> # #
>> p.save
=> false
>> p.errors
-=> #["can't be blank",
+=> #["can't be blank",
"is too short (minimum is 5 characters)"],
:name=>["can't be blank"] }>
@@ -742,7 +742,7 @@ def update
respond_to do |format|
if @post.update_attributes(params[:post])
- format.html { redirect_to(@post,
+ format.html { redirect_to(@post,
:notice => 'Post was successfully updated.') }
format.xml { head :ok }
else
@@ -1056,7 +1056,7 @@ Then in the +app/views/posts/show.html.erb+ you can change it to look like the f
Comments
-<%= render :partial => "comments/comment",
+<%= render :partial => "comments/comment",
:collection => @post.comments %>
Add a comment:
@@ -1127,7 +1127,7 @@ Then you make the +app/views/posts/show.html.erb+ look like the following:
Comments
-<%= render :partial => "comments/comment",
+<%= render :partial => "comments/comment",
:collection => @post.comments %>
Add a comment:
@@ -1213,15 +1213,15 @@ Rails provides a very simple HTTP authentication system that will work nicely in
class ApplicationController < ActionController::Base
protect_from_forgery
-
+
private
-
+
def authenticate
authenticate_or_request_with_http_basic do |user_name, password|
user_name == 'admin' && password == 'password'
end
end
-
+
end
@@ -1381,7 +1381,7 @@ Finally, we will edit the app/views/posts/show.html.erb template to sho
Comments
-<%= render :partial => "comments/comment",
+<%= render :partial => "comments/comment",
:collection => @post.comments %>
Add a comment:
@@ -1405,7 +1405,7 @@ Open up app/helpers/posts_helper.rb and add the following:
module PostsHelper
def join_tags(post)
- post.tags.map { |t| t.name }.join(", ")
+ post.tags.map { |t| t.name }.join(", ")
end
end
@@ -1436,7 +1436,7 @@ Now you can edit the view in app/views/posts/show.html.erb to look like
Comments
-<%= render :partial => "comments/comment",
+<%= render :partial => "comments/comment",
:collection => @post.comments %>
Add a comment:
--
cgit v1.2.3