From 4eacdda67bab5c99ac5cf4f15dc42de9912650cc Mon Sep 17 00:00:00 2001 From: ferro96 Date: Sat, 11 Jan 2025 00:49:32 -0600 Subject: [PATCH] Added configuration for displaying images --- app/views/courses/_course.html.haml | 1 + config/application.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/courses/_course.html.haml b/app/views/courses/_course.html.haml index 910934a..074cd6b 100644 --- a/app/views/courses/_course.html.haml +++ b/app/views/courses/_course.html.haml @@ -5,6 +5,7 @@ -if course.avatar.attached? .card-img-top = image_tag course.avatar, height: "200px", width: "100%" + -# = image_tag course.avatar.variant(resize_to_limit: [100, 100]) .card-body %small= simple_format(course.short_description) .card-footer diff --git a/config/application.rb b/config/application.rb index 38e8f16..e544f4f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -15,6 +15,7 @@ class Application < Rails::Application # not contain `.rb` files, or that should not be reloaded or eager loaded. # Common ones are `templates`, `generators`, or `middleware`, for example. config.autoload_lib(ignore: %w[assets tasks]) + config.active_storage.variant_processor = :mini_magick # Configuration for the application, engines, and railties goes here. #