Newer version of Rails have this option as default. We can slowly
transition to opt in gradually, model by model. Once all models are
covered, we can change the default and remove the setting from the
models again.
The style violation was added to the todo file because it's temporary.
We have 60 models using `belongs_to`. And changing them all at once
breaks some specs. So let's do it gradually.
This ends up sending a request to the orders endpoint with no filters and no search params, which then tries to load every order in the entire database if the user is superadmin, which blows up.
And provide a basic hover state for most other buttons.
The pagination button hover and active states will need updating.
The darker background colour sometimes wraps a whole table (eg products table).
There is more to do, for example the dropshadows.
I've continued with the unopinionated colour naming (eg color-7), but would like to consider giving them more meaningfule names..
The current value is 13px already, but I'd like to experiment changing this.
I'm not sure if we even need the reset, but am not delving into that right now.
There seems to be some contexts (jobs for subscriptions) where the Payment class loads but LocalizedNumber is an undefined constant. It lives in the /lib directory so it's not auto-loaded.
Rubocop was complaining about too many arguments. But
`ApplicationJob#perform` needs all arguments handled in one call. While
we could allow the `perform` method generally to have more arguments,
there could be other methods called `perform` which should still be
scrutinised. Instead, it seems acceptable to me to have more arguments
as long as they are clearly named as keyword arguments. Rails uses this
a lot to document all options including their default values, for
example in Active Storage. It's better then bundling several arguments
in an undocumented hash just to reduce the number of given arguments.
And once we upgraded to Ruby 3.1, we can clean the method calls up as
well. `call(user: user)` becomes `call(user:)` without repetition.
This is not a normal pattern for setting up ActionCable channels, so it might need some notes. It ensures the broadcasts from the ReportJob are unique not just to the user session but also to the specific tab in the user's browser. Otherwise if the user has two different report pages open in separate tabs with the same session, the broadcast would overwrite the #report-table element in both of them.