aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-10-29 21:40:23 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-10-29 21:40:23 +0000
commit3ba23348de4c7765b67e3715d2ab84c998bb1cea (patch)
treeb162629f2cdba0db66ce1f05aad55ff8ab718e36
parentbef071dd0b6b634c5e8e49d8c1b9daa0baa4136c (diff)
downloadrails-3ba23348de4c7765b67e3715d2ab84c998bb1cea.tar.gz
rails-3ba23348de4c7765b67e3715d2ab84c998bb1cea.tar.bz2
rails-3ba23348de4c7765b67e3715d2ab84c998bb1cea.zip
Excise generated whitespace. Closes #10017 [Tim Pope]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8055 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--railties/doc/README_FOR_APP2
-rw-r--r--railties/helpers/application.rb2
-rw-r--r--railties/lib/rails_generator/generators/components/model/templates/migration.rb2
-rw-r--r--railties/lib/rails_generator/generators/components/resource/templates/USAGE18
4 files changed, 3 insertions, 21 deletions
diff --git a/railties/doc/README_FOR_APP b/railties/doc/README_FOR_APP
index af0cc2cccf..fe41f5cc24 100644
--- a/railties/doc/README_FOR_APP
+++ b/railties/doc/README_FOR_APP
@@ -1,2 +1,2 @@
Use this README file to introduce your application and point to useful places in the API for learning more.
-Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. \ No newline at end of file
+Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
diff --git a/railties/helpers/application.rb b/railties/helpers/application.rb
index d3d33e4f9d..9a79f69a41 100644
--- a/railties/helpers/application.rb
+++ b/railties/helpers/application.rb
@@ -7,4 +7,4 @@ class ApplicationController < ActionController::Base
# See ActionController::RequestForgeryProtection for details
# Uncomment the :secret if you're not using the cookie session store
protect_from_forgery # :secret => '<%= app_secret %>'
-end \ No newline at end of file
+end
diff --git a/railties/lib/rails_generator/generators/components/model/templates/migration.rb b/railties/lib/rails_generator/generators/components/model/templates/migration.rb
index a834c6bf98..387e9b141e 100644
--- a/railties/lib/rails_generator/generators/components/model/templates/migration.rb
+++ b/railties/lib/rails_generator/generators/components/model/templates/migration.rb
@@ -4,7 +4,7 @@ class <%= migration_name %> < ActiveRecord::Migration
<% for attribute in attributes -%>
t.<%= attribute.type %> :<%= attribute.name %>
<% end %>
- t.timestamps
+ t.timestamps
end
end
diff --git a/railties/lib/rails_generator/generators/components/resource/templates/USAGE b/railties/lib/rails_generator/generators/components/resource/templates/USAGE
deleted file mode 100644
index 1c03d44bdb..0000000000
--- a/railties/lib/rails_generator/generators/components/resource/templates/USAGE
+++ /dev/null
@@ -1,18 +0,0 @@
-Description:
- The resource generator creates an empty model and controller for use in a REST-friendly, resource-oriented
- application. Say you want to a resource called post. Normally, you could just call "script/generate model post" and
- "script/generate controller posts". This generator basically just collapses these two generators into one step.
-
- The generator takes the name of the model as its first argument. This model name is then pluralized to get the
- controller name. So "resource post" will generate a Post model and a PostsController and will be intended
- for URLs like /posts and /posts/45.
-
- As additional parameters, the generator will take attribute pairs described by name and type. These attributes will
- be used to prepopulate the migration to create the table for the model and give you a set of predefined fixture.
- You don't have to think up all attributes up front, but it's a good idea of adding just the baseline of what's
- needed to start really working with the resource.
-
-Examples:
- ./script/generate resource post
- ./script/generate resource post title:string created_on:date body:text published:boolean
- ./script/generate resource purchase order_id:integer created_at:datetime amount:decimal