diff --git a/Gemfile b/Gemfile index f71cb950b..8dde556bb 100644 --- a/Gemfile +++ b/Gemfile @@ -19,6 +19,7 @@ gem "dalli", "~> 2.7.11" gem "delayed_job_active_record", "~> 4.1.6" gem "devise", "~> 4.8.0" gem "devise-security", "~> 0.16.0" +gem "file_validators", "~> 3.0.0" gem "font-awesome-sass", "~> 5.15.1" # Remember to update vendor/assets/images/fontawesome when updating this gem gem "foundation-rails", "~> 6.6.2.0" gem "foundation_rails_helper", "~> 4.0.0" @@ -33,12 +34,12 @@ 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" gem "omniauth-rails_csrf_protection", "~> 1.0.0" gem "omniauth-twitter", "~> 1.4.0" -gem "paperclip", "~> 6.1.0" gem "paranoia", "~> 2.4.3" gem "pg", "~> 1.2.3" gem "pg_search", "~> 2.3.5" diff --git a/Gemfile.lock b/Gemfile.lock index dd0425134..efa05e5f6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -250,6 +250,9 @@ GEM faraday-patron (1.0.0) faraday-rack (1.0.0) ffi (1.15.4) + file_validators (3.0.0) + activemodel (>= 3.2) + mime-types (>= 1.0) font-awesome-sass (5.15.1) sassc (>= 1.11) foundation-rails (6.6.2.0) @@ -370,9 +373,7 @@ GEM mime-types (3.3.1) mime-types-data (~> 3.2015) mime-types-data (3.2021.0704) - 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) @@ -426,12 +427,6 @@ GEM omniauth-oauth (~> 1.1) rack orm_adapter (0.5.0) - paperclip (6.1.0) - activemodel (>= 4.2.0) - activesupport (>= 4.2.0) - mime-types - mimemagic (~> 0.3.0) - terrapin (~> 0.6.0) parallel (1.20.1) paranoia (2.4.3) activerecord (>= 4.0, < 6.2) @@ -722,6 +717,7 @@ DEPENDENCIES erb_lint (~> 0.0.37) factory_bot_rails (~> 6.2.0) faker (~> 2.18.0) + file_validators (~> 3.0.0) font-awesome-sass (~> 5.15.1) foundation-rails (~> 6.6.2.0) foundation_rails_helper (~> 4.0.0) @@ -742,12 +738,12 @@ 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) omniauth-rails_csrf_protection (~> 1.0.0) omniauth-twitter (~> 1.4.0) - paperclip (~> 6.1.0) paranoia (~> 2.4.3) pg (~> 1.2.3) pg_search (~> 2.3.5) 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.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.attachment,
target: "_blank",
rel: "nofollow" %>
diff --git a/app/views/polls/_gallery.html.erb b/app/views/polls/_gallery.html.erb
index f62f28831..43ac86cf6 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? %>