|
|
|
@ -188,6 +188,7 @@ class HacksController < ApplicationController
|
|
|
|
|
def param_update_sets sets, all_sets_id
|
|
|
|
|
delete_set_ids = all_sets_id - sets.map{|set|set[:id]}
|
|
|
|
|
@hack.hack_sets.where(id: delete_set_ids).destroy_all
|
|
|
|
|
logger.info("#######sets:#{sets}")
|
|
|
|
|
sets.each do |set|
|
|
|
|
|
if all_sets_id.include?(set[:id])
|
|
|
|
|
update_attrs = {input: set[:input], output: set[:output], position: set[:position]}
|
|
|
|
|