Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
最初にレコードをチェックせずに、条件ごとにレコードを更新できますか?
はい、メソッドはupdate_allです。
# Update all books with 'Rails' in their title Book.update_all "author = 'David'", "title LIKE '%Rails%'"
http://apidock.com/rails/ActiveRecord/Relation/update_all