Commit Graph

7 Commits

Author SHA1 Message Date
0daf413b47 Prevent sole admin from deleting their account
Without this guard, the last admin in the system could delete their own
account, making the application unmanageable. This adds a model method
`User#sole_admin?`, a controller guard in `RegistrationsController#destroy`,
and disables the delete button in the profile edit view when the current
user is the only remaining admin.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 06:52:14 +00:00
9d60eee16b Add Measurements tab and #new form 2025-01-25 16:34:04 +01:00
b3aea97087 Add Quantities tab 2025-01-05 03:18:39 +01:00
537cd18336 Change namespace for defaults controllers
To allow proper path prefix for view partials when using
config.action_view.prefix_partial_path_with_controller_namespace
2024-11-09 21:50:50 +01:00
965cb76f1d Generate Units::Defaults controller
bin/rails g controller Units/Defaults index
2024-05-04 01:53:57 +02:00
deaf0fa73b Generate User scaffold
bundle exec rails generate scaffold user email:string{64}:uniq
  status:integer
2023-03-11 22:56:32 +01:00
6d2d12a9da rails new
THOR_MERGE=vimdiff bundle exec rails new -d mysql --skip-action-mailbox
  --skip-action-text --skip-active-job --skip-active-storage
  --skip-action-cable --skip-hotwire --skip-jbuilder --skip-bootsnap
  --skip-bundle .
2023-03-05 19:23:29 +01:00