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 9. File uploading

This chapter covers

  • Attaching files to Active Record models using the CarrierWave gem
  • Securing file uploads by serving them via a controller
  • An introduction to writing JavaScript using CoffeeScript
  • Listening and responding to Rails’ JavaScript events

In chapter 8, you learned how to restrict access to specific actions in your application, such as viewing projects and creating tickets, by defining a Role model that keeps track of which users have which roles on which projects. Ticketee’s getting pretty useful now. This chapter focuses on file uploading, the next logical step in a ticket-tracking application.

Sometimes, when people file a ticket on an application such as Ticketee, they want to attach a file to ...

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