How do you write in the Rails way? I have a model - Managers. I want to delete all records from Managers that meet the condition that manager_level is 5.
Thank you.
This should work:
Manager.where(:manager_level => 5).delete_all
Note: This will not remove dependent records.