Ruby on Rails Enterprise Application Development::
Plan, Program, Extend
www.PACKTPUB.com  FREE ONLINE EDITION: Read full chapters online, download free samples from the book and more...
Book Contents Index > Chapter 8
Introduction
1: Introduction
2: The Initial Problem
3: Laying the Foundations
4: Working with Rails Free Chapter
5: Building the User Interface
6: Into Production
7: Improving the User Experience
8: Extending the Application
9: Advanced Deployment

10: Down the Track

Appendix A: Running Your Own Gem Server

Index

Latest Updates

Free Chapter:

Chapter 4: Working with Rails [ 1.7 MB PDF]

Code Download

Contact us

Chapter 8: Extending the Application

In this chapter, we're going to see how to extend the Intranet application, using mock (but hopefully realistic) feedback from users as a basis for the extensions. The feedback covers both desired enhancements to existing features, and new feature requests. Doing this will demonstrate more breadth of the features provided by the Rails, and how to logically add new components to an application.

The feedback received from the users included:

  • Adding people search facilities
  • Handling errors properly
  • Using sessions and cookies for user authentication
  • Doing simple task tracking
  • Adding file uploads

We're also going to look at integrating the work of other programmers into a project. The primary means for doing this is through plugins, so we'll see how to discover and install them for your own applications.

Chapter 8: Extending the Application

  • Dealing with User Feedback
  • Adding a Search Facility
  • Handling Errors
    • Catching Missing Record Errors
    • Catching UnknownAction and Routing Errors
    • Catching General Application-Level Errors
    • Catching "Rails has Fallen Over" Errors
  • Adding an Authentication System
    • Cookies and Sessions in Rails
    • Building the Authentication System
      • The User Model
      • Displaying the Login Form
      • Checking Submitted Credentials
      • Logging Out
      • Protecting Actions
  • Adding Simple Task Tracking
    • The Task Model
    • The Tasks Controller
    • Task Views
    • Showing Tasks for a Person
    • Redirecting to a Person after Adding or Editing a Task
    • Redirecting after a Deletion
    • Handling the Cancel Link
    • Setting a Default Person for a New Task
    • Summary
  • Uploading and Attaching Files
    • Using Plugins
    • Using acts_as_attachment for File Uploads
    • Managing File Attachments for a Task
      • Adding a Form for Attaching a File to a Task
      • Adding a File Attachment to a Task
      • Listing File Attachments for a Task
      • Deleting File Attachments for a Task
      • Protecting File Attachment Actions
  • Summary
   

 

Paperback 528 pages
Released: October 2007
ISBN: 1847190855
ISBN 13: 978-1-847190-85-7

     

 




View the book details
on PacktPub.com

 


 

  This website is owned and maintained by Packt Publishing Ltd, 2007. All rights reserved. Terms and Conditions