Quantity parent options are updated through UJS
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class QuantitiesController < ApplicationController
|
||||
before_action :init_session_filters
|
||||
before_action :find_project_by_project_id, only: [:index, :create, :filter]
|
||||
before_action :find_project_by_project_id, only: [:index, :parents, :create, :filter]
|
||||
before_action :find_quantity, only: [:edit, :update, :destroy, :toggle, :move]
|
||||
before_action :authorize
|
||||
|
||||
@@ -10,6 +10,11 @@ class QuantitiesController < ApplicationController
|
||||
prepare_quantities
|
||||
end
|
||||
|
||||
def parents
|
||||
@form = params[:form]
|
||||
@domain = params[:quantity][:domain]
|
||||
end
|
||||
|
||||
def create
|
||||
@quantity = @project.quantities.new(quantity_params)
|
||||
if @quantity.save
|
||||
|
||||
Reference in New Issue
Block a user