app/controllers/spotlight/roles_controller.rb in blacklight-spotlight-0.1.0 vs app/controllers/spotlight/roles_controller.rb in blacklight-spotlight-0.2.0

- old
+ new

@@ -38,10 +38,10 @@ def authorize_nested_attributes(attrs, klass) attrs = attrs.values if attrs.is_a? Hash delete_count = 0 attrs.each do |item| if item[:id] - if ActiveRecord::ConnectionAdapters::Column.value_to_boolean(item['_destroy']) + if item['_destroy'].present? authorize! :destroy, klass.find(item[:id]) delete_count += 1 else authorize! :update, klass.find(item[:id]) end