From 4265f2eaa50b9783059bc84c3f8d2d4001fa9b7a Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 25 Jul 2011 15:10:13 -0700 Subject: sync the getting started guide with master --- railties/guides/source/getting_started.textile | 7 ++++--- 1 file changed, 4 insertions(+), 3 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 0b89021392..6c8aa668b2 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -197,9 +197,10 @@ For example, the following HTTP request: DELETE /photos/17 -refers to a photo resource with an ID of 17 and indicates an action to be taken -upon it: deletion. REST is a natural web application architecture which Rails -abstracts, shielding you from RESTful complexities and browser quirks. +would be understood to refer to a photo resource with the ID of 17, and to +indicate a desired action - deleting that resource. REST is a natural style for +the architecture of web applications, and Rails hooks into this shielding you +from many of the RESTful complexities and browser quirks. If you'd like more details on REST as an architectural style, these resources are more approachable than Fielding's thesis: -- cgit v1.2.3 From 2dc6cca773380e55d2afe0d3de34fa7c68f9f7d7 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Tue, 26 Jul 2011 19:35:16 +0530 Subject: move the note after the scaffold files listing --- railties/guides/source/getting_started.textile | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 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 6c8aa668b2..3cca383616 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -536,21 +536,8 @@ command in your terminal: $ rails generate scaffold Post name:string title:string content:text -This will create a new database table called posts (plural of Post). The table -will have three columns, name (type string), title (type string) and content -(type text). It will also hook this new database up to Rails (details below). - -NOTE. While scaffolding will get you up and running quickly, the code it -generates is unlikely to be a perfect fit for your application. You'll most -probably want to customize the generated code. Many experienced Rails developers -avoid scaffolding entirely, preferring to write all or most of their source code -from scratch. Rails, however, makes it really simple to customize templates for -generated models, controllers, views and other source files. You'll find more -information in the "Creating and Customizing Rails Generators & -Templates":generators.html guide. - -The scaffold generator will build 17 files in your application, along with some -folders, and edit one more. Here's a quick overview of what it creates: +The scaffold generator will build several files in your application, along with some +folders, and edit config/routes.rb. Here's a quick overview of what it creates: |_.File |_.Purpose| |db/migrate/20100207214725_create_posts.rb |Migration to create the posts table in your database (your name will include a different timestamp)| @@ -571,6 +558,15 @@ folders, and edit one more. Here's a quick overview of what it creates: |test/unit/helpers/posts_helper_test.rb |Unit testing harness for the posts helper| |config/routes.rb |Edited to include routing information for posts| +NOTE. While scaffolding will get you up and running quickly, the code it +generates is unlikely to be a perfect fit for your application. You'll most +probably want to customize the generated code. Many experienced Rails developers +avoid scaffolding entirely, preferring to write all or most of their source code +from scratch. Rails, however, makes it really simple to customize templates for +generated models, controllers, views and other source files. You'll find more +information in the "Creating and Customizing Rails Generators & +Templates":generators.html guide. + h4. Running a Migration One of the products of the +rails generate scaffold+ command is a _database -- cgit v1.2.3 From 95bece9155c46a2273a3febc3a2e176b8c15df8f Mon Sep 17 00:00:00 2001 From: Joost Baaij Date: Mon, 22 Aug 2011 00:10:01 +0300 Subject: Removed my name from the changelog as the amount of blogspam became ridiculous. When will docrails be back? :-p --- railties/guides/source/getting_started.textile | 1 - 1 file changed, 1 deletion(-) (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 092ca90a30..755f59f8f9 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -1890,7 +1890,6 @@ h3. Changelog * April 26, 2011: Change migration code from +up+, +down+ pair to +change+ method by "Prem Sichanugrist":http://sikachu.com * April 11, 2011: Change scaffold_controller generator to create format block for JSON instead of XML by "Sebastian Martinez":http://www.wyeworks.com -* August 30, 2010: Minor editing after Rails 3 release by "Joost Baaij":http://www.spacebabies.nl * July 12, 2010: Fixes, editing and updating of code samples by "Jaime Iniesta":http://jaimeiniesta.com * May 16, 2010: Added a section on configuration gotchas to address common encoding problems that people might have by "Yehuda Katz":http://www.yehudakatz.com * April 30, 2010: Fixes, editing and updating of code samples by "Rohit Arondekar":http://rohitarondekar.com -- cgit v1.2.3 From c46befbce300722650e324047a9342f628acc36d Mon Sep 17 00:00:00 2001 From: Joost Baaij Date: Tue, 23 Aug 2011 14:17:29 +0200 Subject: Revert "Removed my name from the changelog as the amount of blogspam became ridiculous. " This reverts commit 95bece9155c46a2273a3febc3a2e176b8c15df8f. --- railties/guides/source/getting_started.textile | 1 + 1 file changed, 1 insertion(+) (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 755f59f8f9..092ca90a30 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -1890,6 +1890,7 @@ h3. Changelog * April 26, 2011: Change migration code from +up+, +down+ pair to +change+ method by "Prem Sichanugrist":http://sikachu.com * April 11, 2011: Change scaffold_controller generator to create format block for JSON instead of XML by "Sebastian Martinez":http://www.wyeworks.com +* August 30, 2010: Minor editing after Rails 3 release by "Joost Baaij":http://www.spacebabies.nl * July 12, 2010: Fixes, editing and updating of code samples by "Jaime Iniesta":http://jaimeiniesta.com * May 16, 2010: Added a section on configuration gotchas to address common encoding problems that people might have by "Yehuda Katz":http://www.yehudakatz.com * April 30, 2010: Fixes, editing and updating of code samples by "Rohit Arondekar":http://rohitarondekar.com -- cgit v1.2.3 From 707378c4892a4666c8b7ed73bef577338bca3c38 Mon Sep 17 00:00:00 2001 From: Joost Baaij Date: Tue, 23 Aug 2011 14:18:06 +0200 Subject: removed the link to my blog to help stop endless comments --- railties/guides/source/getting_started.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 092ca90a30..d2bfcfdbb4 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -1890,7 +1890,7 @@ h3. Changelog * April 26, 2011: Change migration code from +up+, +down+ pair to +change+ method by "Prem Sichanugrist":http://sikachu.com * April 11, 2011: Change scaffold_controller generator to create format block for JSON instead of XML by "Sebastian Martinez":http://www.wyeworks.com -* August 30, 2010: Minor editing after Rails 3 release by "Joost Baaij":http://www.spacebabies.nl +* August 30, 2010: Minor editing after Rails 3 release by Joost Baaij * July 12, 2010: Fixes, editing and updating of code samples by "Jaime Iniesta":http://jaimeiniesta.com * May 16, 2010: Added a section on configuration gotchas to address common encoding problems that people might have by "Yehuda Katz":http://www.yehudakatz.com * April 30, 2010: Fixes, editing and updating of code samples by "Rohit Arondekar":http://rohitarondekar.com -- cgit v1.2.3