Update record by conditions Ruby on Rails -
can update record conditions without check record first?
yes, method update_all.
# update books 'rails' in title book.update_all "author = 'david'", "title '%rails%'"
can update record conditions without check record first?
yes, method update_all.
# update books 'rails' in title book.update_all "author = 'david'", "title '%rails%'"
Comments
Post a Comment