O'Reilly logo

Rails 4 in Action: Revised Edition of Rails 3 in Action by Ryan Bigg, Yehuda Katz, Steve Klabnik, and Rebecca Skinner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Tracking state

This chapter covers

  • Adding state to tickets and comments
  • Using Active Record callbacks to trigger state changes
  • Recording and displaying state transitions
  • Securing specific model attributes elements against unauthorized modification

In a ticket-tracking application such as Ticketee, tickets aren’t there to provide information about specific problems or suggestions; rather, they’re there to provide the workflow for them.

The general workflow of a ticket starts when a user files the ticket; the ticket will be classified as a “New” ticket. When the developers of the project look at this ticket and decide to work on it, they’ll switch the state on the ticket to “open,” and once they’re done they’ll mark it as “resolved.” ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required