Created
June 28, 2011 06:13
-
-
Save sgonyea/1050591 to your computer and use it in GitHub Desktop.
Ruby's Asterisk Operator is so useful
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
attrs = [*params['records']].pop || {} | |
@note = Note.find(params[:id]) | |
attrs.delete :location_id | |
@note.update_attributes(attrs.slice(*Note.attribute_names)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment