Selectively modifying attr_accessible
I came across the need to have a user list with checkboxes for ‘admin’ and ‘fleet_commander’ to allow them to be set. Which works great- until you realise that your user model is protected from forms setting those fields! This was using the ‘Toggle Attributes with Ajax’ recipe from ‘Advanced Rails Recipes’- an excellent book, [...]