diff options
-rw-r--r-- | README.md | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -63,6 +63,13 @@ class MessagesController < ApplicationController end ``` +Variation of image attachment: + +```erb +<%# Hitting the variant URL will lazy transform the original blob and then redirect to its new service location %> +<%= image_tag url_for(user.avatar.variant(resize: "100x100")) %> +``` + ## Installation 1. Add `require "active_storage"` to config/application.rb, after `require "rails/all"` line. |