Skip to content

Commit ece1310

Browse files
authored
Merge pull request #75 from dalvarez2596/lesson-117
Added configuration for displaying images
2 parents 3020eca + 4eacdda commit ece1310

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

app/views/courses/_course.html.haml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
-if course.avatar.attached?
66
.card-img-top
77
= image_tag course.avatar, height: "200px", width: "100%"
8+
-# = image_tag course.avatar.variant(resize_to_limit: [100, 100])
89
.card-body
910
%small= simple_format(course.short_description)
1011
.card-footer

config/application.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Application < Rails::Application
1515
# not contain `.rb` files, or that should not be reloaded or eager loaded.
1616
# Common ones are `templates`, `generators`, or `middleware`, for example.
1717
config.autoload_lib(ignore: %w[assets tasks])
18+
config.active_storage.variant_processor = :mini_magick
1819

1920
# Configuration for the application, engines, and railties goes here.
2021
#

0 commit comments

Comments
 (0)