Commit Graph

9 Commits

Author SHA1 Message Date
3702e24153 Add taken_at to readouts and default unit to quantities
Readouts gain a taken_at timestamp (distinct from created_at) that records
when the measurement was actually taken. Measurements are now ordered by
taken_at descending.

Quantities gain an optional default_unit association. When set, the unit
is pre-selected in the measurement form. A "Set as default" button on the
unit selector lets users update the default directly from the form.

- Migrations: add taken_at (datetime) to readouts,
              add default_unit_id (fk → units) to quantities
- Readout: expose taken_at in ATTRIBUTES permit-list
- Quantity: add default_unit belongs_to, expose in ATTRIBUTES
- QuantitiesController: load @user_units for form actions
- Quantities views: add Default unit column and select to form
- Readouts form: pre-select default unit; add "Set as default" button
  (readoutUnitChanged / setDefaultUnit wired up in a later commit)
- Measurements form: default taken_at input to current time
- ApplicationHelper: propagate :form option to html_options in builder
- config/environments/test.rb: allow Capybara's dynamic host
- Tests: system tests for default-unit UI on the Quantities page

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 22:01:52 +00:00
ef0f3cbae3 Revert to asset precompilation in production 2025-07-26 00:10:59 +02:00
magicfixin
5ffc6974f0 Improve installation process 2025-07-23 23:42:41 +02:00
de995aa586 Testing environment updates 2024-01-15 02:05:08 +01:00
9a56681a85 Fix warnings 2024-01-14 03:27:22 +01:00
e4f595a329 Fix translations and enable i18n testing 2023-05-14 16:37:53 +02:00
74db85f26a Remove exception checking from system tests 2023-05-02 03:14:55 +02:00
2d95b11a34 Test registration e-mail 2023-04-19 00:31:52 +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