Class: Trestle::Turbo::TagBuilder

Inherits:
Turbo::Streams::TagBuilder
  • Object
show all
Defined in:
app/helpers/trestle/turbo/tag_builder.rb

Instance Method Summary collapse

Instance Method Details

#close_modal(target) ⇒ Object



8
9
10
# File 'app/helpers/trestle/turbo/tag_builder.rb', line 8

def close_modal(target)
  turbo_stream_action_tag :closeModal, targets: target
end

#flashObject



12
13
14
# File 'app/helpers/trestle/turbo/tag_builder.rb', line 12

def flash
  turbo_stream_action_tag :flash, template: @view_context.render(partial: "trestle/flash/flash", formats: :html)
end


4
5
6
# File 'app/helpers/trestle/turbo/tag_builder.rb', line 4

def modal(template=nil)
  turbo_stream_action_tag :modal, template: @view_context.render(template: template || @view_context.action_name, layout: "layouts/trestle/modal", prefixes: @view_context.controller._prefixes, formats: :html)
end

#reloadObject



16
17
18
# File 'app/helpers/trestle/turbo/tag_builder.rb', line 16

def reload
  turbo_stream_action_tag :reload
end