CARVIEW |
- Sign In to comment
Rails 3 in a Nutshell | Chapter 1![]() |
Rails 3 in a Nutshell
Cody Fauser
James MacAulay
Edward Ocampo-Gooding
John Guenin
Copyright © 2010 Cody Fauser, James MacAulay, Edward Ocampo-Gooding, and John Guenin
This work has been released under the Creative Commons Attribution-Noncommercial license.
Abstract
Note
You are reading the text of an O'Reilly book that's under development. The authors are publishing the book to this site as it's being written, and we're putting it here to get feedback from you. This book uses the Open Feedback Publishing System (OFPS), an O'Reilly experiment that tries to bridge the gap between private manuscripts and public blogs.
Next to every paragraph, there is a link you can use to comment on what you're reading. We are grateful for any feedback you have: questions, comments, suggestions, and corrections are all welcome and appreciated.
Rails in a Nutshell is a concise introduction to Rails, an overview of commands and configurations, and a guide to the parts of Rails you’ll be using every day.
Full of examples and explanations, this book kicks your skills into high-gear by showing you how to take advantage of the Model-View-Controller concept with tiny but expressive bits of Ruby that power some of the world’s biggest and fastest web services.
Fast to launch and a pleasure to get there are hallmarks of working with Rails. Rails in a Nutshell gets the right stuff in your hands quickly and without fuss, so you can experience it yourself.
Follow the progress of the book on Twitter twitter.com/railsnutshell, at railsinanutshell.com, and at the book's catalog page.
- 1. Rails in a Nutshell
- Architecture
- Getting Started
- Generate a Rails application
- Generate a scaffolded resource
- Running database migrations
- Check out your working application
- Setting up a default route
- XSS protection
- View helpers
- Model validations
- RSS feeds & request formats
- View layouts
- Routes
- Model associations
- Nested resources
- Partials
- AJAX & RJS
- The Console
- Summary
- 2. Active Model
- 3. Active Record
- Your interfaces to Active Record
- Connecting to a Database
- A Model's Names
- Developing your Database Schema with Migrations
- Associations
- Attributes
- Validations
- Callbacks
- Single Table Inheritance
- Aggregation
- Creating
- Finding the records you want
- Constructing Relations
- Calculations
- Updating
- Deleting
- Named Scopes
- Transactions
- Dynamic Scopes
- Observers
- 4. Routing
- 5. Action Controller
- 6. Caching
- 7. Rack
- 8. Active Resource
- 9. Action Mailer
- 10. Active Support
- 11. Testing
- 12. Plugins
- 13. Internationalization
- 14. Production Environments
- 15. Tools
- 16. Appendix
Rails 3 in a Nutshell | Chapter 1![]() |
- MikeSummers – Posted Oct. 21, 2009
Will there be an Action View Chapter? A placeholder would be good.
- codyfauser – Posted Oct. 21, 2009
Mike,
There will be. The incomplete sections are currently not shown, but you're right, it would be good to have the table of contents complete with the entire structure. However, that might also make it frustrating if most parts are empty.
- blaix – Posted Oct. 27, 2009
I think a complete table of contents would help so we're not worried something important might not be covered.
- alexbaum – Posted Oct. 28, 2009
Hi. We would like to translate this book to russian lang, have we rights to do this? We start at https://railstranslate.novarchiv.org, but Wiki is not usable to do this :). Can you recommend any service for open-translate?
PS: Thanks for this book :)
- alexbaum – Posted Oct. 28, 2009
We are https://translated.by/you/rails-in-a-nutshell/ :)
- faisal – Posted Nov. 23, 2009
Can we get a one-page version of the book (including comments) so we can load it into our Kindles or what have you?
- zawaideh – Posted Feb. 6, 2010
I am unable to post comments next to the paragraphs.. is this the only place to do so?
- Constantine – Posted April 21, 2010
Unable to post individual comments, but on page https://rails-nutshell.labs.oreilly.com/ch01.html#id1978287 it says
"With the server running in a terminal, vist https://localhost:3000 in a web browser. If everything is working correctly, you should be looking at a web page with some suggestions on how to get started writing your application.
Follow its advice and use the script/generate command to create
Looking at the nouns in the project description, it’s clear that a video is going to be a resource this application is going to use. Each video resource will have a title and some HTML embed code."
Which has a sentence with no end or finishing punctuation.
- edward – Posted Oct. 16, 2010
Hi folks,
It looks like we missed responding to the questions in this thread. Sorry about that.
Faisal: Thanks for the tip. The intro’s been updated, but needs another go-over now that Rails 3 is out. (I’ve been writing a few of the other chapters since.)
Zaid: you should be able to add it to any paragraph. If you can’t, then that’s our fault. Any place in particular where you can’t?
Constantine: it looks like there
- jeromewilson – Posted Nov. 7, 2010
Attempting to access chapter 1 throws a server error :(
- guanxsi – Posted Nov. 7, 2010
server error in chapter1 for 3 days already
- edwardog – Posted Nov. 8, 2010
Sorry about that – we don’t get exception logs with this setup. It’s fixed now.
Thanks for taking a look!
- Catherine Young – Posted June 24, 2011
I have never considered that surfing can be so much helpful and entertaining. I'm truly happy and grateful for sharing me with this kind of terrific points. Really an excellent page...you are only the best.
Edited on June 24, 2011, 3:36 a.m. PDT
Add a comment
![]() ©2011, O'Reilly Media, Inc. (707) 827-7000 / (800) 998-9938 All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. |
|
are the books docbook sources available?
Hi Pratik,
The docbook sources are heavily modified by some code-generation tools and other stuff that pieces it all together, so I imagine they wouldn't be that useful.
Once the first edition is out, ping us again and we'll see if we can figure something out.
Post is nicely written and it contains many good things for me. I am glad to find your impressive way of writing the post. Now it become easy for me to understand and implement the concept.Essay writing
Edited on June 14, 2011, 3:45 p.m. PDT
Add a comment