The rails way

910 67 0
The rails way

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

www.it-ebooks.info THE RAILS WAY www.it-ebooks.info Addison-Wesley Professional Ruby Series Obie Fernandez, Series Editor The Addison-Wesley Professional Ruby Series provides readers with practical, people-oriented, and in-depth information about applying the Ruby platform to create dynamic technology solutions The series is based on the premise that the need for expert reference books, written by experienced practitioners, will never be satisfied solely by blogs and the Internet Books currently in the series The Ruby Way: Solutions and Techniques in Ruby Programming, Second Edition Hal Fulton, ISBN 13: 9780672328848, ©2007 RailsSpace: Building a Social Networking Website with Ruby on Rails™ Michael Hartl & Aurelius Prochazka, ISBN 13: 9780321480798, ©2008 The Rails Way Obie Fernandez, ISBN 13: 9780321445612, ©2008 Design Patterns in Ruby Russ Olsen, ISBN 13: 9780321490452, ©2008 Short Cuts Rails Routing David A Black 0321509242 â2007 Rails Refactoring to Resources: Using CRUD and REST in Your Rails Application Trotter Cashion • 0321501748 â2007 Mongrel: Serving, Deploying and Extending Your Ruby Applications Matt Pelletier and Zed Shaw 0321483502 â2007 Rails Plugins: Extending Rails Beyond the Core James Adam • 0321483510 â2007 Rubyism in Rails Jacob Harris 0321474074 • ©2007 Troubleshooting Ruby Processes: Leveraging System Tools when the Usual Ruby Tricks Stop Working Philippe Hanrigou • 0321544684 • ©2008 Writing Efficient Ruby Code Dr Stefan Kaes • 0321540034 • ©2008 Video RailsSpace Ruby on Rails Tutorial (Video LiveLessons) Aurelius Prochazka 0321517067 â2008 www.awprofessional.com/ruby www.it-ebooks.info THE RAILS WAY Obie Fernandez Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City www.it-ebooks.info Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests For more information, please contact: U.S Corporate and Government Sales (800) 382-3419 corpsales@pearsontechgroup.com For sales outside the United States please contact: International Sales international@pearsoned.com This Book Is Safari Enabled The Safari® Enabled icon on the cover of your favorite technology book means the book is available through Safari Bookshelf When you buy this book, you get free access to the online edition for 45 days Safari Bookshelf is an electronic reference library that lets you easily search thousands of technical books, find code samples, download chapters, and access technical information whenever and wherever you need it To gain 45-day Safari Enabled access to this book: • Go to http://www.awprofessional.com/safarienabled • Complete the brief registration form • Enter the coupon code 52GH-T7VF-4T1U-ATFQ-DMJH If you have difficulty registering on Safari Bookshelf or accessing the online edition, please e-mail customer-service@safaribooksonline.com Visit us on the Web: www.awprofessional.com Library of Congress Cataloging-in-Publication Data: Fernandez, Obie The Rails way / Obie Fernandez p cm Includes index ISBN 0-321-44561-9 (pbk : alk paper) Ruby on rails (Electronic resource) Object-oriented programming (Computer science) Ruby (Computer program language) Web site development Application softare Development I Title QA76.64F47 2007 005.1'17 dc22 2007039880 Copyright © 2008 Pearson Education, Inc All rights reserved Printed in the United States of America This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise For information regarding permissions, write to: Pearson Education, Inc Rights and Contracts Department 75 Arlington Street, Suite 300 Boston, MA 02116 Fax: (617) 848-7047 www.it-ebooks.info This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/) ISBN-13: 978-0-321-44561-9 ISBN-10: 0-321-44561-9 Text printed in the United States on recycled paper at R.R Donnelly in Crawfordsville, IN First printing November 2007 Parts of this book contain material excerpted from the Ruby and Rails source code and API documentation, Copyright © 2004-2006 by David Heinemeier Hansson under the MIT license Chapter 18 contains material excerpted from the RSpec source code and API documentation, Copyright © 2005-2007 The RSpec Development Team The MIT License reads: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software THE SOFTWARE IS PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER DEALINGS IN THE SOFTWARE Associate Publisher Copy Editor Mark Taub Margaret Berson Acquisitions Editor Proofreader Debra Williams Cauley Kathy Ruiz Development Editor Technical Reviewer Songlin Qiu Francis Hwang Sebastian Delmont Managing Editor Wilson Bilkovich Patrick Kanouse Courtenay Gasking Senior Project Editor Sam Aaron San Dee Phillips Nola Stowe Indexer Tim Wright Susan Potter Jon Larkowski Publishing Coordinator Cindy Teeters Book Designer Chuti Prasertsith Composition Mark Shirar www.it-ebooks.info This page intentionally left blank www.it-ebooks.info To Desi, my love, my companion, my muse www.it-ebooks.info This page intentionally left blank www.it-ebooks.info This page intentionally left blank www.it-ebooks.info ... solely by blogs and the Internet Books currently in the series The Ruby Way: Solutions and Techniques in Ruby Programming, Second Edition Hal Fulton, ISBN 13: 9780672328848, ©2007 RailsSpace: Building... SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE. .. routes.rb File 63 The Default Route 65 Spotlight on the :id Field 66 Default Route Generation 67 Modifying the Default Route 68 The Ante-Default Route and respond_to 69 respond_to and the HTTP-Accept

Ngày đăng: 19/04/2019, 10:57

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan