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
Avo::TurboStreamActionsHelper defines Turbo Stream helper methods for #download, #flash_alerts, and #close_modal. These are very common names which can clash with other identically named Turbo Stream helper methods that may be defined by a Rails application or by other libraries. In our case, we have our own Turbo Stream helper called #close_modal and because we also do a Turbo::Streams::TagBuilder.prepend on own helpers, the two clash with each other and the Avo one ends up taking precedence as it gets included after ours do. However, because they're both identically named, one of them will inherently fail unless one of these two methods is renamed. I'd suggest renaming these methods to #avo_download, #avo_flash_alerts, and #avo_close_modal to prevent them from clashing with user applications.
Steps to Reproduce
Create your own Turbo Stream helpers in a module and prepend them into Turbo::Streams::TagBuilder.
Expected behavior & Actual behavior
Avo Turbo Stream helpers should not overwrite those found in the main app.
Models and resource files
pp/helpers/avo/turbo_stream_actions_helper.rb
System configuration
Avo version: 3.14.1
Rails version: 8.0.0
Ruby version: 3.3.6
License type:
Community
Pro
Advanced
Are you using Avo monkey patches, overriding views or view components?
None that would impact this particular issue, since the issue is due to prepending identically named methods into Turbo::Streams::TagBuilder.
Screenshots or screen recordings
N/A
Additional context
N/A
Impact
High impact (It makes my app un-usable.) -- makes functionality in our app unusable unless we modify our own method names, but this issue could also impact other libraries that have similarly named Turbo Stream helpers, so avoiding name clashes on all sides would be advisable.
Medium impact (I'm annoyed, but I'll live.)
Low impact (It's really a tiny thing that I could live with.)
Urgency
High urgency (I can't continue development without it.)
Medium urgency (I found a workaround, but I'd love to have it fixed.)
Low urgency (It can wait. I just wanted you to know about it.)
The text was updated successfully, but these errors were encountered:
Describe the bug
Avo::TurboStreamActionsHelper defines Turbo Stream helper methods for
#download
,#flash_alerts
, and#close_modal
. These are very common names which can clash with other identically named Turbo Stream helper methods that may be defined by a Rails application or by other libraries. In our case, we have our own Turbo Stream helper called#close_modal
and because we also do aTurbo::Streams::TagBuilder.prepend
on own helpers, the two clash with each other and the Avo one ends up taking precedence as it gets included after ours do. However, because they're both identically named, one of them will inherently fail unless one of these two methods is renamed. I'd suggest renaming these methods to#avo_download
,#avo_flash_alerts
, and#avo_close_modal
to prevent them from clashing with user applications.Steps to Reproduce
Create your own Turbo Stream helpers in a module and prepend them into
Turbo::Streams::TagBuilder
.Expected behavior & Actual behavior
Avo Turbo Stream helpers should not overwrite those found in the main app.
Models and resource files
pp/helpers/avo/turbo_stream_actions_helper.rb
System configuration
Avo version: 3.14.1
Rails version: 8.0.0
Ruby version: 3.3.6
License type:
Are you using Avo monkey patches, overriding views or view components?
None that would impact this particular issue, since the issue is due to prepending identically named methods into
Turbo::Streams::TagBuilder
.Screenshots or screen recordings
N/A
Additional context
N/A
Impact
Urgency
The text was updated successfully, but these errors were encountered: