diff --git a/app/views/proposals/_geozones.html.erb b/app/components/proposals/geozones_component.html.erb similarity index 100% rename from app/views/proposals/_geozones.html.erb rename to app/components/proposals/geozones_component.html.erb diff --git a/app/components/proposals/geozones_component.rb b/app/components/proposals/geozones_component.rb new file mode 100644 index 000000000..d0379f8dc --- /dev/null +++ b/app/components/proposals/geozones_component.rb @@ -0,0 +1,4 @@ +class Proposals::GeozonesComponent < ApplicationComponent + delegate :image_path_for, to: :helpers + +end diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index 411b0d32b..57dd73dc6 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -119,7 +119,7 @@ <% if params[:retired].blank? %> <%= render "categories" %> <%= render "shared/tag_cloud", taggable: "Proposal" %> - <%= render "geozones" %> + <%= render Proposals::GeozonesComponent.new %> <% end %> <%= render "retired" %> <%= render "proposals_lists" %> diff --git a/app/views/proposals/summary.html.erb b/app/views/proposals/summary.html.erb index e7a86ed6d..9f74c3963 100644 --- a/app/views/proposals/summary.html.erb +++ b/app/views/proposals/summary.html.erb @@ -46,7 +46,7 @@ <%= link_to t("proposals.index.start_proposal"), new_proposal_path, class: "button radius expand" %> <%= render "shared/tag_cloud", taggable: "Proposal" %> <%= render "categories" %> - <%= render "geozones" %> + <%= render Proposals::GeozonesComponent.new %>