Tabla de Contenidos:
  • Machine generated contents note: 1. Ruby on Rails, the framework
  • 1.1. What is Ruby on Rails?
  • Benefits
  • Common terms
  • Rails in the wild
  • 1.2. Developing your first application
  • Installing Rails
  • Generating an application
  • Starting the application
  • Scaffolding
  • Migrations
  • Viewing and creating purchases
  • Validations
  • Showing off
  • Routing
  • Updating
  • Deleting
  • 1.3. Summary
  • 2. Testing saves your bacon
  • 2.1. Test-and behavior-driven development
  • 2.2. Test-driven development
  • Why test?
  • Writing your first test
  • Saving bacon
  • 2.3. Behavior-driven development
  • RSpec
  • Cucumber
  • 2.4. Summary
  • 3. Developing a real Rails application
  • 3.1. Application setup
  • The application story
  • Version control
  • The Gemfile and generators
  • Database configuration
  • Applying a stylesheet
  • 3.2. First steps
  • Creating projects
  • RESTful routing
  • Committing changes
  • Setting a page title
  • Validations
  • 3.3. Summary
  • 4. Oh CRUD!
  • 4.1. Viewing projects
  • Writing a feature
  • The Factory Girl
  • Adding a link to a project
  • 4.2. Editing projects
  • The edit action
  • The update action
  • 4.3. Deleting projects
  • Writing a feature
  • Adding a destroy action
  • Looking for what isn't there
  • 4.4. Summary
  • 5. Nested resources
  • 5.1. Creating tickets
  • Nested routing helpers
  • Creating a tickets controller
  • Defining a has_many association
  • Creating tickets within a project
  • Finding tickets scoped by project
  • Ticket validations
  • 5.2. Viewing tickets
  • Listing tickets
  • Culling tickets
  • 5.3. Editing tickets
  • Adding the edit action
  • Adding the update action
  • 5.4. Deleting tickets
  • 5.5. Summary
  • 6. Authentication and basic authorization
  • 6.1. What Devise does
  • Installing Devise
  • 6.2. User signup
  • 6.3. Confirmation link sign-in
  • Testing email
  • Confirming confirmation
  • 6.4. Form sign-in
  • 6.5. Linking tickets to users
  • Attributing tickets to users
  • We broke something!
  • Fixing the Viewing Tickets feature
  • Fixing the Editing Tickets feature
  • Fixing the Deleting Tickets feature
  • 6.6. Summary
  • 7. Basic access control
  • 7.1. Projects can be created only by admins
  • 7.2. Adding the admin field to the users table
  • 7.3. Restricting actions to admins only
  • Fixing three more broken scenarios
  • Hiding the New Project link
  • Hiding the edit and delete links
  • 7.4. Namespace routing
  • 7.5. Namespace-based CRUD
  • Adding a namespace root
  • The index action
  • The new action
  • The create action
  • 7.6. Creating admin users
  • 7.7. Editing users
  • The show action
  • The edit and update actions
  • 7.8. Deleting users
  • Ensuring you can't delete yourself
  • 7.9. Summary
  • 8. More authorization
  • 8.1. Restricting read access
  • 8.2. Restricting by scope
  • 8.3. Fixing what you broke
  • Fixing Editing Projects
  • Fixing the four failing features
  • One mare thing
  • Fixing Signing Up
  • 8.4. Blocking access to tickets
  • Locking out the bad guys
  • 8.5. Restricting write access
  • Rewriting a feature
  • Blocking creation
  • What is CanCan?
  • Adding abilities
  • 8.6. Restricting update access
  • No updating for you!
  • Authorizing editing
  • 8.7. Restricting delete access
  • Enforcing destroy protection
  • Hiding links based on permission
  • 8.8. Assigning permissions
  • Viewing projects
  • And the rest
  • 8.9. Seed data
  • 8.10. Summary
  • 9. File uploading
  • 9.1. Attaching a File
  • A feature featuring files
  • Enter stage right, Paperclip
  • Using Paperclip
  • 9.2. Attaching many files
  • Two more files
  • Using nested attributes
  • 9.3. Serving files through a controller
  • Protecting files
  • Showing your assets
  • Public assets
  • Privatizing assets
  • 9.4. Using JavaScript
  • JavaScript testing
  • Introducing jQuery
  • Adding more files with JavaScript
  • Responding to an asynchronous request
  • Sending parameters for an asynchronous request
  • 9.5. Summary
  • 10. Tracking state
  • 10.1. Leaving a comment
  • Where's the ticket?
  • The comment form
  • The comment model
  • The comments controller
  • 10.2. Changing a ticket's state
  • Creating the State model
  • Selecting states
  • Callbacks
  • Seeding states
  • Fixing creating comments
  • 10.3. Tracking changes
  • Ch-ch-changes
  • Another c-c-callback
  • Displaying changes
  • Show me the page
  • Automatic escaping saves your bacon
  • Styling states
  • 10.4. Managing states
  • Adding additional states
  • Defining a default slate
  • 10.5. Locking down states
  • Hiding a select box
  • Bestowing changing slate permissions
  • Hacking a form
  • Ignoring a parameter
  • 10.6. Summary
  • 11. Tagging
  • 11.1. Creating tags
  • Creating tags feature
  • Using text_field_tag
  • Showing tags
  • Defining the tags association
  • The Tag model
  • Displaying a ticket's tags
  • 11.2. Adding more tags
  • Adding tags through a comment
  • Fixing the CommentsController spec
  • 11.3. Tag restriction
  • Testing tag restriction
  • Tags are allowed, for some
  • 11.4. Deleting a tag
  • Testing tag deletion
  • Adding a link to delete the tag
  • Actually removing a tag
  • 11.5. Finding tags
  • Testing search
  • Searching by stale with Searcher
  • Searching by state
  • Search, but without the search
  • 11.6. Summary
  • 12. Sending email
  • 12.1. Sending ticket notifications
  • Automatically watching a ticket
  • Using observers
  • Defining the watchers association
  • Introducing Action Mailer
  • An Action Mailer template
  • Delivering HTML emails
  • 12.2. Subscribing to updates
  • Testing comment subscription
  • Automatically adding a user to a watchlist
  • Unsubscribing from ticket notifications
  • 12.3. Real-world email
  • Testing real-world email
  • Configuring Action Mailer
  • Connecting to Gmail
  • 12.4. Receiving emails
  • Setting a reply-to address
  • Receiving a reply
  • 12.5. Summary
  • 13. Designing an API
  • 13.1. The projects API
  • Your first API
  • Serving an API
  • API authentication
  • Error reporting
  • Serving XML
  • Creating projects
  • Restricting access to only admins
  • A single project
  • No project for you!
  • Updating a project
  • Exterminate!
  • 13.2. Beginning the tickets API
  • 13.3. Rate limiting
  • One request, two request, three request, four
  • No more, thanks!
  • Back to zero
  • 13.4. Versioning an API
  • Creating a new version
  • 13.5. Summary
  • 14. Deployment
  • 14.1. Server setup
  • Setting up a server using VirtualBox
  • Installing the base
  • 14.2. RVM and Ruby
  • Installing RVM
  • Installing Ruby
  • 14.3. Creating a user for the app
  • Key-based authentication
  • Disabling password authentication
  • 14.4. The database server
  • Creating a database and user
  • Ident authentication
  • 14.5. Deploy away!
  • Deploy keys
  • Configuring Capistrano
  • Setting up the deploy environment
  • Deploying the application
  • Bundling gems
  • Choosing a database
  • 14.6. Serving requests
  • Installing Passenger
  • An init script
  • 14.7. Summary
  • 15. Alternative authentication
  • 15.1. How OAuth works
  • 15.2. Twitter authentication
  • Selling up OmniAuth
  • Registering an application with Twitter
  • Setting up an OmniAuth testing environment
  • Testing Twitter sign-in
  • 15.3. GitHub authentication
  • Registering and testing GitHub auth
  • 15.4. Summary
  • 16. Basic performance enhancements
  • 16.1. Pagination
  • Introducing Kaminari
  • Paginating an interface
  • Paginating an API
  • 16.2. Database query enhancements
  • Eager loading
  • Database indexes
  • 16.3. Page and action caching
  • Caching a page
  • Caching an action
  • Cache sweepers
  • Client-side caching
  • Caching page fragments
  • 16.4. Background workers
  • 16.5. Summary
  • 17. Engines
  • 17.1.A brief history of engines
  • 17.2. Why engines are useful
  • 17.3. Brand-new engine
  • Creating an engine
  • The layout of an engine
  • Engine routing
  • 17.4. Setting up a testing environment
  • Removing Test: Unit
  • Installing RSpec and Capybara
  • 17.5.
  • Writing your first engine feature
  • Your first Capybara test
  • Setting up routes
  • The topics controller
  • The index action
  • The new action
  • The create action
  • The show action
  • Showing an association count
  • 17.6. Adding more posts to topics
  • 17.7. Classes outside your control
  • Engine configuration
  • A fake User model
  • Authenticating topics
  • Adding authorship to topics
  • Post authentication
  • Showing the last post
  • 17.8. Releasing as a gem
  • 17.9. Integrating with an application
  • 17.10. Summary
  • 18. Rack-based applications
  • 18.1. Building Rack applications
  • A basic. Rack application
  • 18.2. Building bigger Rack applications
  • You're breaking up
  • Running a combined Rack application
  • 18.3. Mounting a Rack application with Rails
  • Mounting Heartbeat
  • Introducing Sinatra
  • The API, by Sinatra
  • Basic error checking
  • 18.4. Middleware
  • Middleware in Rails
  • Investigating ActionDispatch: Static
  • Crafting middleware
  • 18.5. Summary.