lib/engine2/action.rb in engine2-1.0.7 vs lib/engine2/action.rb in engine2-1.0.8
- old
+ new
@@ -376,16 +376,12 @@
end
end
case at
when :list #, :star_to_many_list, :many_to_one_list # list dropdowns
- divider = false
model.one_to_many_associations.merge(model.many_to_many_associations).each do |assoc_name, assoc|
unless assoc[:propagate] == false
- menu(:item_menu).divider unless divider
- divider ||= true
- menu(:item_menu).option :"#{assoc_name}!", icon: "list" # , click: "action.show_assoc($index, \"#{assoc_name}!\")"
node.run_scheme :star_to_many, :"#{assoc_name}!", assoc
end
end
end
@@ -905,10 +901,11 @@
nd.confirm_delete.delete.*.invoke_delete_db(handler, hash[:delete].to_a, model.table_name) unless hash[:delete].to_a.empty?
nd.link.*.invoke_link_db(handler, record.primary_key_values, hash[:link].to_a) unless hash[:link].to_a.empty?
nd.confirm_unlink.unlink.*.invoke_unlink_db(handler, record.primary_key_values, hash[:unlink].to_a) unless hash[:unlink].to_a.empty?
end
end
+ after_save(handler, record)
result
end
end
(model.validation_in_transaction || new_assoc == :many_to_many) ? model.db.transaction(&save) : save.(nil)
end
@@ -925,9 +922,12 @@
rec.errors.each do |k, v|
(record.errors[assoc_name] ||= []).concat(v)
end unless rec.errors.empty?
end
end
+ end
+
+ def after_save handler, record
end
end
module ActionInsertSupport
def allocate_record handler, json_rec