In #527 we added the sellable scope to Articles and SubscriptionOffers, but some places where we use these models were forgotten:
- SubscriptionOffers passed to the "new sale" controller (
app/controllers/sales_controller.rb
- in the same controller, "create sale" action when errored, for Articles and SubscriptionOffers
- remove all
.unscoped in tests
Also in the admin dashboard, maybe we can distinguish between sellable and unsellable items (strikethrough? in a separate list hidden by default?). At least remove the delete icon for items that have already been deleted).
Maybe we can add a sellable? method on models for ease of use.
In #527 we added the
sellablescope to Articles and SubscriptionOffers, but some places where we use these models were forgotten:app/controllers/sales_controller.rb.unscopedin testsAlso in the admin dashboard, maybe we can distinguish between sellable and unsellable items (strikethrough? in a separate list hidden by default?). At least remove the delete icon for items that have already been deleted).
Maybe we can add a
sellable?method on models for ease of use.