Guest User

Untitled

a guest
Feb 21st, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. def existing_asset_attributes=(asset_attributes)
  2. assets.reject(&:new_record?).each do |asset|
  3. attributes = asset_attributes[asset.id.to_s]
  4. if attributes
  5. asset.attributes = attributes
  6. else
  7. asset.delete(asset)
  8. end
  9. end
  10. end
Add Comment
Please, Sign In to add comment