end
def remove au
- d = false
- panel_pictures_attributes = {}
- self.panel.panel_pictures.each do |panel_picture|
- attr = panel_picture.attributes
- if panel_picture == self
- attr['_destroy'] = true
- d = true
- else
- if d
- attr['t'] -= 1
- end
- end
- panel_pictures_attributes[panel_picture.id] = attr
- end
- self.panel.attributes = {:panel_pictures_attributes => panel_pictures_attributes}
- self.panel.store({}, au)
+ self.panel.remove_element(self, au)
end
def scenario