lib/stimulus_reflex/reflex.rb in stimulus_reflex-3.2.0 vs lib/stimulus_reflex/reflex.rb in stimulus_reflex-3.2.1
- old
+ new
@@ -83,11 +83,14 @@
def url_params
@url_params ||= Rails.application.routes.recognize_path_with_request(request, request.path, request.env[:extras] || {})
end
def process(name, *args)
- result = run_callbacks(:process) { public_send(name, *args) }
- @halted ||= result == false
+ reflex_invoked = false
+ result = run_callbacks(:process) {
+ public_send(name, *args).tap { reflex_invoked = true }
+ }
+ @halted ||= result == false && !reflex_invoked
result
end
# Indicates if the callback chain was halted via a throw(:abort) in a before_reflex callback.
# SEE: https://api.rubyonrails.org/classes/ActiveSupport/Callbacks.html