Closed PedroAugustoRamalhoDuarte closed 5 months ago
wow that was fast
@bknoles i see the problem with class_attribute and i refactor with this idea in mind: https://github.com/inertiajs/inertia-rails/pull/108#issuecomment-2050573597.
Basically using instance attributes and before_action
, the CI is passing, but i think we need some more tests
Want to review the code a bit more, but, as I mentioned in #115 , I'm leaning towards merging this!
The tests that are failling in CI are bit flaky, i dont know if is a error in the test code or in the new controller implementation i can check better in this friday
Great addition! Refactoring to stick with default Rails conventions by using instance variables to store inertia_share
data and using inertia_share
as a wrapper for before_action
improves the clarity and maintainability of the code. Future enhancements, like supporting only
and except
features from before_action
, would also be beneficial and add more flexibility. Good job!
Great addition! Refactoring to stick with default Rails conventions by using instance variables to store
inertia_share
data and usinginertia_share
as a wrapper forbefore_action
improves the clarity and maintainability of the code. Future enhancements, like supportingonly
andexcept
features frombefore_action
, would also be beneficial and add more flexibility. Good job!
Team support! I like it! 😀
Released as part of 3.2.0
!
Goal
This PR refactors how
inertia_share
is storage inside the request lifecycle.Solution
The solution was to sticky with default rails conventions, using only instance variable to storage inertia_share data and using inertia_share as a wrapper to rails before_action
Future improves
only
,expect
features from before_action.