Skip to Content
Learn Rails 5.2: Accelerated Web Development with Ruby on Rails
book

Learn Rails 5.2: Accelerated Web Development with Ruby on Rails

by Stefan Wintermeyer
April 2018
Beginner to intermediate
444 pages
7h 35m
English
Apress
Content preview from Learn Rails 5.2: Accelerated Web Development with Ruby on Rails
© Stefan Wintermeyer 2018
Stefan WintermeyerLearn Rails 5.2https://doi.org/10.1007/978-1-4842-3489-1_17

17. Active Storage

Stefan Wintermeyer1 
(1)
Bochum, Germany
 

Ruby on Rails 5.2 introduced Active Storage , which can be used to attach files (e.g., avatar images) to objects and store those files on the server or in the cloud.

Not only can Active Storage store files, but it can also convert and resize them. In this chapter, I will show you how to attach a file to give you the basic idea of how Active Storage works.

Avatar Example

First, I’m sorry for not coming up with a more original example! Everybody uses avatars to describe how to attach something, but I will do it too because it is such a common use case.

Let’s create a new phone book application ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Rails 6: Accelerated Web Development with Ruby on Rails

Learn Rails 6: Accelerated Web Development with Ruby on Rails

Adam Notodikromo
Agile Web Development with Rails 5.1

Agile Web Development with Rails 5.1

Sam Ruby, David B. Copeland, Dave Thomas
Rails 4 in Action

Rails 4 in Action

Yehuda Katz, Rebecca Skinner, Stephen Klabnik, Ryan Bigg

Publisher Resources

ISBN: 9781484234891Purchase LinkPublisher Website