You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the TurboBoost::Commands::Command class in conjunction with the prevent_controller_action method, I've found that it's impossible to access the Current module. This is causing issues, especially when trying to fetch context-based data.
Steps to reproduce:
Create aCommand < TurboBoost::Commands::Command class and use the prevent_controller_action method inside it.
Attempt to access any Current helper or another Rails helper method.
Observe the inability to access or call these methods.
Expected Behavior:
I expected to be able to access the Current helpers inside the TurboBoost::Commands::Command class, even when the prevent_controller_action method is used.
Actual Behavior:
The Current module are inaccessible, which has caused data flow issues in our application.
Potential Solutions or Workarounds:
Currently, I'm passing necessary data from the client to the server via data- attributes. While this works, it would be more streamlined if the Current context and other helpers were accessible directly. Moreover, passing sensitive data like the current user or account through data- attributes poses a risk, as they can be tampered with on the client side.
The text was updated successfully, but these errors were encountered:
Does attempting to access Current raise an error or are the values missing? If the values are missing, then see this answer for a solution/work-around. #110 (comment)
Description:
When using the
TurboBoost::Commands::Command
class in conjunction with theprevent_controller_action
method, I've found that it's impossible to access theCurrent
module. This is causing issues, especially when trying to fetch context-based data.Steps to reproduce:
Command < TurboBoost::Commands::Command
class and use theprevent_controller_action
method inside it.Current
helper or another Rails helper method.Expected Behavior:
I expected to be able to access the
Current
helpers inside theTurboBoost::Commands::Command
class, even when theprevent_controller_action
method is used.Actual Behavior:
The
Current
module are inaccessible, which has caused data flow issues in our application.Potential Solutions or Workarounds:
Currently, I'm passing necessary data from the client to the server via
data-
attributes. While this works, it would be more streamlined if theCurrent
context and other helpers were accessible directly. Moreover, passing sensitive data like the current user or account throughdata-
attributes poses a risk, as they can be tampered with on the client side.The text was updated successfully, but these errors were encountered: