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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user