Basic fullcalendar integration
This commit is contained in:
@@ -32,7 +32,8 @@ module Suppliers
|
||||
# PUT /employees/1.json
|
||||
def update
|
||||
@employee = Employee.find(params[:id])
|
||||
render json: {}, status: 404 unless @employee.supplier_id == current_supplier.id
|
||||
render json: {}, status: 404 unless current_supplier.employee_ids.include?(@employee.id)
|
||||
current_supplier.settings_for(@employee).update!(employee_params)
|
||||
respond_to do |format|
|
||||
if @employee.update_attributes(employee_params)
|
||||
format.json { head :no_content }
|
||||
@@ -57,7 +58,7 @@ module Suppliers
|
||||
private
|
||||
|
||||
def employee_params
|
||||
params.require(:employee).permit(:name, :email)
|
||||
params.require(:employee).permit(:name, :email, :active, :manager, :color)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user