Created
September 16, 2022 13:45
-
-
Save skojin/ebc3218c5c7c1b7bcf1eb0d9c2b7a1b6 to your computer and use it in GitHub Desktop.
batch set enabled flag from table with checkboxes
This file contains 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
current_account.items.update_all(['enabled = (SELECT id IN (?))', Array(params[:ids])]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment