Move proposals form partial to a component

Since now categories are loaded in both the investment form component
and proposal form component, and their controllers are the only
"commentable" controllers using the `@categories` instance variable, we
can remove the `load_categories` call in `CommentableActions` affecting
the create and update actions.
This commit is contained in:
Javi Martín
2021-07-09 16:03:44 +02:00
parent 755ad330a2
commit 4150d7f1be
6 changed files with 128 additions and 116 deletions

View File

@@ -7,7 +7,7 @@ class ProposalsController < ApplicationController
include MapLocationAttributes
include Translatable
before_action :load_categories, only: [:index, :new, :create, :edit, :map, :summary]
before_action :load_categories, only: [:index, :map, :summary]
before_action :load_geozones, only: [:edit, :map, :summary]
before_action :authenticate_user!, except: [:index, :show, :map, :summary]
before_action :destroy_map_location_association, only: :update