Skip to content

Instantly share code, notes, and snippets.

@cj
Created December 2, 2011 16:04
Show Gist options
  • Save cj/1423766 to your computer and use it in GitHub Desktop.
Save cj/1423766 to your computer and use it in GitHub Desktop.
# PUT /auto/claims/1/notes
def update_all
ids = [*params[:ids]] + [0] # makes sure it works when no navbars are selected
note= Auto::Note.update_all(params[:note], {:id => ids})
if not note.errors
respond_with note, notice: 'Notes were successfully updated.'
else
respond_with note.errors, status: :unprocessable_entity
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment