Module: ValidateHTML::ActiveSupportNotificationHandler
- Defined in:
- lib/validate_html/active_support_notification_handler.rb
Overview
Validate HTML from Turbo::StreamsChannel as called by ActiveSupport::Notifications.instrument
Class Method Summary collapse
-
.call(_name, _start, _finish, _id, payload) ⇒ Boolean
Validate HTML from Turbo::StreamsChannel as called by ActiveSupport::Notifications.instrument.
Class Method Details
.call(_name, _start, _finish, _id, payload) ⇒ Boolean
Validate HTML from Turbo::StreamsChannel as called by ActiveSupport::Notifications.instrument
16 17 18 19 20 |
# File 'lib/validate_html/active_support_notification_handler.rb', line 16 def self.call(_name, _start, _finish, _id, payload) return unless payload && payload[:channel_class] == 'Turbo::StreamsChannel' ValidateHTML.validate_html(payload[:data]) end |