def update_property_sets(resource_id)
(params[:property_sets] || []).each do |key, set_keys|
- Property.with_key_prefix(key + '.').delete_all
+ Property.with_key_prefix(key + '.').with_resource(resource_id).delete_all
update_property(key, set_keys, resource_id)
params[key].each do |field_key, field_values|
<% choices = Property.values(property.propertySetKey).reject(&:blank?) -%>
<% prompt = [[message('default'), '']] -%>
-<% if choices.exclude? value -%>
+<% if !value.blank? && (choices.exclude? value) -%>
+ <%= image_tag 'exclamation.png' -%>
<% missing = [[h(value + ' <' + message('deleted') + '>'), value]] -%>
<% else -%>
<% missing = [] -%>
<% end -%>
-<%= select_tag name, options_for_select(prompt + choices + missing, value), :id => id -%>
-
-<% if choices.exclude? value -%>
- <%= image_tag 'exclamation.png' -%>
-<% end -%>
+<%= select_tag name, options_for_select(prompt + choices + missing, value), :id => id -%>
\ No newline at end of file