diff --git a/Gemfile b/Gemfile index f71cb950b..28833049f 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,7 @@ gem "jquery-fileupload-rails" gem "jquery-rails", "~> 4.4.0" gem "jquery-ui-rails", "~> 6.0.1" gem "kaminari", "~> 1.2.1" +gem "mini_magick", "~> 4.11.0" gem "omniauth", "~> 2.0.4" gem "omniauth-facebook", "~> 8.0.0" gem "omniauth-google-oauth2", "~> 1.0.0" diff --git a/Gemfile.lock b/Gemfile.lock index dd0425134..1ea2c5adb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -373,6 +373,7 @@ GEM mimemagic (0.3.10) nokogiri (~> 1) rake + mini_magick (4.11.0) mini_mime (1.1.0) mini_portile2 (2.6.1) minitest (5.14.4) @@ -742,6 +743,7 @@ DEPENDENCIES launchy (~> 2.5.0) letter_opener_web (~> 1.4.0) mdl (~> 0.11.0) + mini_magick (~> 4.11.0) omniauth (~> 2.0.4) omniauth-facebook (~> 8.0.0) omniauth-google-oauth2 (~> 1.0.0) diff --git a/app/components/admin/widget/cards/row_component.html.erb b/app/components/admin/widget/cards/row_component.html.erb index 974753dc8..c66b28708 100644 --- a/app/components/admin/widget/cards/row_component.html.erb +++ b/app/components/admin/widget/cards/row_component.html.erb @@ -12,7 +12,7 @@
- <%= link_to document.attachment.url, target: "_blank" do %> + <%= link_to document.storage_attachment, target: "_blank" do %> <%= document.title %> (<%= document.humanized_content_type %> | diff --git a/app/views/dashboard/mailer/forward.html.erb b/app/views/dashboard/mailer/forward.html.erb index f3f25fe12..95cea001c 100644 --- a/app/views/dashboard/mailer/forward.html.erb +++ b/app/views/dashboard/mailer/forward.html.erb @@ -15,7 +15,7 @@ <% if @proposal.image.present? %> - <%= image_tag @proposal.image.attachment.url(:large), style: "width: 100%; box-shadow: -16px 61px 49px -19px rgba(0,0,0,0.1);" %> + <%= image_tag @proposal.image.variant(:large), style: "width: 100%; box-shadow: -16px 61px 49px -19px rgba(0,0,0,0.1);" %> <% else %> <%= image_tag "default_mailing.jpg", style: "width: 100%; box-shadow: -16px 61px 49px -19px rgba(0,0,0,0.1);" %> <% end %> diff --git a/app/views/dashboard/mailing/index.html.erb b/app/views/dashboard/mailing/index.html.erb index 1886d07c8..bf1f01fb9 100644 --- a/app/views/dashboard/mailing/index.html.erb +++ b/app/views/dashboard/mailing/index.html.erb @@ -9,7 +9,7 @@
<%= sanitize_and_auto_link milestone.description %>
@@ -37,7 +37,7 @@
<% milestone.documents.each do |document| %>
<%= link_to document.title,
- document.attachment.url,
+ document.storage_attachment,
target: "_blank",
rel: "nofollow" %>
diff --git a/app/views/polls/_gallery.html.erb b/app/views/polls/_gallery.html.erb
index f62f28831..e62827908 100644
--- a/app/views/polls/_gallery.html.erb
+++ b/app/views/polls/_gallery.html.erb
@@ -18,8 +18,8 @@
<% answer.images.reverse.each_with_index do |image, index| %>
<% end %>
diff --git a/app/views/proposals/_proposal.html.erb b/app/views/proposals/_proposal.html.erb
index 733e3adf2..0b3c8ec33 100644
--- a/app/views/proposals/_proposal.html.erb
+++ b/app/views/proposals/_proposal.html.erb
@@ -8,7 +8,7 @@
<% if proposal.image.present? %>