Commit Graph

17 Commits

Author SHA1 Message Date
Jorge Manrubia 5b2fa6b74a Remove nested if 2025-12-16 12:00:23 +01:00
Jorge Manrubia 2671e52821 Move presentation method to a regular view helper 2025-12-16 12:00:23 +01:00
Jorge Manrubia 71369de38d Extract method 2025-12-16 12:00:23 +01:00
Jorge Manrubia b39a9ecab4 Make active_subscription a private method 2025-12-16 12:00:23 +01:00
Jorge Manrubia e47657759f More concise 2025-12-16 12:00:23 +01:00
Jorge Manrubia 3395b8d6ed Grab and show the next amount to pay from Stripe 2025-12-16 12:00:23 +01:00
Jorge Manrubia 8dd31e3635 Add system to comp accounts 2025-12-16 12:00:23 +01:00
Jorge Manrubia 3ef5e4eeef Add record to track overridden limits
Before, we were relying on just changing the cards_count in account, but this
could create problems where the system to calculate the next card number fails due
to the unique constraint.
2025-12-16 12:00:23 +01:00
Jorge Manrubia f4184e5a61 Remove redundant condition 2025-12-16 12:00:23 +01:00
Jason Zimdars d556f051a6 Spelling 2025-12-16 12:00:23 +01:00
Jorge Manrubia e53455d2ca Paid plans never exceed limits! 2025-12-16 12:00:23 +01:00
Jorge Manrubia 5baf9d879d Dont't fail if not set 2025-12-16 12:00:23 +01:00
Jorge Manrubia a25bd9adfd Let's use a single sandbox environment via 1password ENV vars 2025-12-16 12:00:23 +01:00
Jorge Manrubia 984a5dd4ce Add Stripe-based billing system
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Jason Zimdars <jz@37signals.com>
2025-12-16 12:00:23 +01:00
Mike Dalessio 8f73e1e1be Add console1984 and audits1984
To keep as much of this as we can in the `fizzy-saas` gem, this PR
opts to store console/audits models in a separate database, and so:

- the gem contains the migrations and the database config
- the app contains a separate schema file distinctly for SaaS concerns
  - Rails' current behavior prevents us from easily keeping this file in the gem

Also note that the stock `audits1984` schema is updated to reference
the auditor via a UUID foreign key.

Finally, in order for the database schema file to be located in the
gem directory (and not the application directory), it's necessary to
monkeypatch `AR::DatabaseTasks.schema_dump_path` to support absolute
paths. This functionality has been proposed upstream in
https://github.com/rails/rails/pull/56290 but is awaiting a decision
from the core team.

ref: https://app.fizzy.do/5986089/cards/2469
ref: #17
2025-12-04 11:43:48 -05:00
Jorge Manrubia 0b23a4f907 Remove code not used now 2025-11-27 13:12:58 +01:00
Jorge Manrubia db57a7ba0f Initial commit: Move fizzy-saas to separate repository 2025-11-23 06:04:20 +01:00