for some helpers like display_checkout_taxes_hash, it's needed to access the tax rates through the adjument's originator.
The adjustment's originator will store the minimal details: id, type and amount
For every adjustment a list of tax rates will be created using TaxRateFinder.tax_rates_of.
This will prevent running the queries to find the tax rates during the invoice generation.
1. reimplment the helper on the LintItem presenter
2. add the tax rate associated to the line items to the list of objects to serialize during the order serialization.
3. implement a presenter for the introducer tax rates.
When the feature toggle is enabled, we don't want to see the old products page. It's a bit broken and causes confusion. But we still want to be able to access it by the URL for now.
I guess validates_length_from_database also validates numbers. That's not a bad thing.
So now it's being validated, we should validate the transformed value that will be saved to the database.
We know if the values are too long, so let's provide a useful message rather than generating an unhandled database error.
This code seems rather repetetive, it would be good to use a shared module. I wonder if there's a gem for that.
Note that the existing /products/*/edit screen doesn't even handle validation errors yet, but that's something for another day..
The form helper () doesn't work for this case, but it seems we can call it directly like this instead. I'd like to fix the helper, but got stuck this time.
It added specificity but had no use.
I reviewed a couple of screens to make sure:
- /admin/orders/Rx/customer
- /admin/properties/new
I have to confess I don't know how Spree::Admin::BaseHelper is included, or where it's used.
Best viewed with whitespace ignored.
I decided not to invest the time to figure out how to test this..
The messages should have the same effect as the 500 error, but not technically a 500 because it's not handling a HTTP response. The documentation seems to state this covers server-side errors only (not network errors for example). I couldn't find any way to handle network errors with action cable.