资源描述:
《Advanced Rails Recipes.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、AdvancedRailsRecipesMikeClarkandtheRailsCommunityThePragmaticBookshelfRaleigh,NorthCarolinaDallas,TexasManyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirprod-uctsareclaimedastrademarks.Wherethosedesignationsappearinthisbook,andThePragmaticProgrammers,LLCwasawareofatradema
2、rkclaim,thedesignationshavebeenprintedininitialcapitallettersorinallcapitals.ThePragmaticStarterKit,ThePragmaticProgrammer,PragmaticProgramming,PragmaticBookshelfandthelinkinggdevicearetrademarksofThePragmaticProgrammers,LLC.Everyprecautionwastakeninthepreparationofthisbook.However,thepubl
3、isherassumesnoresponsibilityforerrorsoromissions,orfordamagesthatmayresultfromtheuseofinformation(includingprogramlistings)containedherein.OurPragmaticcourses,workshops,andotherproductscanhelpyouandyourteamcreatebettersoftwareandhavemorefun.Formoreinformation,aswellasthelatestPragmatictitl
4、es,pleasevisitusathttp://www.pragprog.comCopyright©2008MikeClark.Allrightsreserved.Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmit-ted,inanyform,orbyanymeans,electronic,mechanical,photocopying,recording,orotherwise,withoutthepriorconsentofthepublisher.Printedinth
5、eUnitedStatesofAmerica.ISBN-10:0-9787392-2-1ISBN-13:978-0-9787392-2-5Printedonacid-freepaperwith50%recycled,15%post-consumercontent.Contents1Introduction81.1WhatMakesaGoodRecipeBook?............81.2WhatMakesThisanAdvancedRecipeBook?......91.3Who’sItFor?.........................91.4Who’sTal
6、king?.......................101.5WhatVersionDoYouNeed?................101.6Resources..........................101.7Acknowledgments......................111.8TagsandThumbTabs...................12PartIRESTandRoutesRecipes131.CreateaRESTfulResource................142.AddYourOwnRESTfulActions.
7、.............203.NestResourcestoScopeAccess..............244.ToggleAttributeswithAjax................305.AuthenticateRESTClients.................336.RespondtoCustomFormats...............397.CatchAll404s........................43PartIIDatabaseRecipes468.AddFore