Module: NitroRails::TurboStreamHelper

Defined in:
app/helpers/nitro_rails/turbo_stream_helper.rb

Instance Method Summary collapse

Instance Method Details

#private_stream_for(user, &block) ⇒ Object



4
5
6
# File 'app/helpers/nitro_rails/turbo_stream_helper.rb', line 4

def private_stream_for(user, &block) 
  turbo_stream_from user, &block
end

#public_stream(&block) ⇒ Object



8
9
10
# File 'app/helpers/nitro_rails/turbo_stream_helper.rb', line 8

def public_stream(&block)
  turbo_stream_from :public, &block
end

#toggle_class(target, class_name, status:) ⇒ Object

METHODS BELOW ONLY NEEDED FOR VIEW/CONTROLLER STREAMS Is this necessary? Is any of this file for that matter?



14
15
16
# File 'app/helpers/nitro_rails/turbo_stream_helper.rb', line 14

def toggle_class(target, class_name, status:)
  turbo_stream_action_tag :toggle_class, targets: target, class: class_name, status: status
end