Commit Graph

14 Commits

Author SHA1 Message Date
7904ff3ef9 Add web-based installation wizard
Replace the CLI-only setup (db:seed + manual application.rb edits)
with a web wizard shown automatically on first visit when no admin
account exists yet.

SetupController (GET/POST /setup) collects the admin e-mail and
password, a "skip e-mail confirmation" toggle, and an option to
seed the built-in default units.  Once submitted it creates the
admin User, persists the chosen options as Setting records, and
redirects to the sign-in page.

ApplicationController gains a redirect_to_setup_if_needed
before_action that catches every request (including Devise routes)
when no admin exists, so a fresh installation always lands on the
wizard rather than an empty sign-in form.

A new Setting model provides a lightweight key-value store for
runtime options that were previously hard-coded in application.rb
(e.g. skip_email_confirmation).  RegistrationsController now reads
that flag from the database instead of from the application config.

Seeds.rb is kept for headless / automated deployments and skips
admin creation when an admin already exists (idempotent), with a
comment pointing to the web wizard as the preferred path.

Also extends the SQLite nil-limit fix (|| Float::INFINITY) to the
Quantity model, which suffered the same ArgumentError as Unit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 17:19:24 +00:00
201359de3e Allow to reparent Quantity everywhere
Closes #61
2025-01-14 21:13:35 +01:00
b8bcbee1e9 Separate root routes for un- and authenticated users
Closes #34
Closes #47
2025-01-02 15:19:33 +01:00
aa83f17a4c Allow specifying navigation tab for controllers 2024-05-06 19:01:54 +02:00
3a3ae71320 Fix layout rendering for turbo_streams
Closes #22
2024-02-13 20:48:00 +01:00
1227c54e0e Fix flashes display after grid introduction
Closes #5
2024-01-17 21:57:18 +01:00
5047d4909f Render units from collection, without redirects 2024-01-15 18:45:30 +01:00
9a9a139aa7 Handle exceptions during TURBO_STREAM requests 2024-01-15 01:59:30 +01:00
459836ca38 Add Users#disguise/#revert 2023-05-13 23:38:07 +02:00
cc65b64a4b Move status checking to model 2023-05-02 03:17:41 +02:00
634ba7e901 Add access control and :forbidden error handling 2023-04-24 23:08:55 +02:00
83335871b4 Add sign-out redirection 2023-04-15 23:52:40 +02:00
0e72219373 Require authentication 2023-04-01 18:53:30 +02: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