1
0

Quantity parent options are updated through UJS

This commit is contained in:
cryptogopher
2019-11-27 20:43:39 +01:00
parent 6e335c243a
commit f6081276f3
6 changed files with 24 additions and 29 deletions

View File

@@ -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