Agile Web Development with Rails

Start from the beginning
                                        

Download work/demo1/app/controllers/say_controller.rb class SayController < ApplicationController

def hello

end

end

This contains thepath to the code within thedownload.Ifyou�fre reading the PDF version of this book and your PDF viewer supports hyperlinks, you can click the bar, and the code should appearin abrowser window. Somebrowsers(such asSafari) will mistakenly try tointerpret some of the templates as HTML. If this happens, view the source of the page to see the real source code.

Ruby Tips

Although you need to know Ruby to write Rails applications, we realize that many folks reading this book will be learning both Ruby and Rails atthesametime.Appendix A, onpage 630,isa(very)briefintroduction to the Ruby language. When we use a Ruby-speci.c construct for the .rst time, we�fll cross-reference it to that appendix. For example, this paragraph contains a gratuitous use of :name, a Ruby symbol. In the :name

page 632 ��.

margin,you�fll see anindication that symbols are explained onpage 632. Ifyoudon�ftknowRuby, orifyou need aquick refresher,you might want to go read Appendix A, on page 630, before you go too much further. There�fs alot of codein thisbook....

David Says... Every now and then you�fll come across a David Says... sidebar. Here�fs whereDavidHeinemeierHanssongivesyou the real scoop on somepar-ticular aspect of Rails.rationales, tricks, recommendations, and more. Becausehe�fsthefellow whoinventedRails,these arethe sectionsto read ifyou want tobecome aRailspro.

JoeAsks... Joe, the mythical developer, sometimes pops up to ask questions about stuff we talk aboutin the text.We answer these as wego along.

Report erratum

Prepared exclusively for Jordan A. Fowler

ACKNOWLEDGMENTS

Thisbookisn�fta reference manualforRails.We show most ofthe modules and most oftheir methods, eitherby example or narrativelyinthetext,but wedon�ft havehundreds ofpages ofAPIlistings.There�fs agood reasonfor this.youget thatdocumentation wheneveryouinstallRails, andit�fsguaranteedtobe more up-to-datethan the materialin thisbook.IfyouinstallRails usingRubyGems (whichwe recommend), simply start thegemdocumentation server(using the command gem_server), and you can access allthe Rails APIs by pointing your browser at http://localhost:8808.(The sidebar onpage 39 describes another way ofinstalling thefullAPIdocumentation.)

Rails Versions

ThisbookdocumentsRails1.2.

If you are not running Rails 1.2, then you�fll need to update before trying the codeinthisbook.IfRails1.2is notyet available(thisbook wenttoprintbefore the of.cial Gem was released), you can download an interim version. See the instructionsinside thefront cover.

1.3 Acknowledgments

You�fd think thatproducing a second edition of abook wouldbe easy.After all, youalreadyhave all thetext.It�fsjust atweak to some codehereand aminor wording change there, andyou�fredone.You�fd think....

It�fs dif.cult to tell exactly, but my impression is that creating this second edition of Agile Web Development with Rails took about as much effort as the .rst edition. Rails was constantly evolving and, as it did, so did this book. Parts of the Depot application were rewritten three or four times, and all of the narrative was updated. The emphasis on REST and the addition of the deprecation mechanism all changed the structure of the book as what was oncehotbecamejustlukewarm.

So, this book would not exist without a massive amount of help from the Ruby and Rails communities. As with the original, this book was released as abetabook: early versionswereposted asPDFs, andpeoplemadecomments online.And commenttheydid: morethan1,200 suggestionsandbug reports wereposted.The vast majority ended upbeingincorporated, makingthisbook immeasurably more useful than it would have been. Thank you all, both for supportingthebetabookprogram andfor contributing so much valuablefeed-back.

You've reached the end of published parts.

⏰ Last updated: Mar 22, 2008 ⏰

Add this story to your Library to get notified about new parts!

Agile Web Development with RailsWhere stories live. Discover now