Use toggle! pra inverter boolean
Closed this issue · 1 comments
marciotoze commented
você pode usar o toogle! pra inverter booleanos e já salvar no banco :)
toggle só inverte a variavel mais não salva
http://apidock.com/rails/ActiveRecord/Persistence/toggle
toggle! inverte e salva no banco
http://apidock.com/rails/ActiveRecord/Persistence/toggle%21
commit | file reference | |
---|---|---|
ed312df | app/controllers/recommendations_controller.rb#L16 |
MarcusSky commented
👍