Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def existing_asset_attributes=(asset_attributes)
- assets.reject(&:new_record?).each do |asset|
- attributes = asset_attributes[asset.id.to_s]
- if attributes
- asset.attributes = attributes
- else
- asset.delete(asset)
- end
- end
- end
Add Comment
Please, Sign In to add comment