Class: Trestle::Turbo::TagBuilder
- Inherits:
-
Turbo::Streams::TagBuilder
- Object
- Turbo::Streams::TagBuilder
- Trestle::Turbo::TagBuilder
- 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 |
#flash ⇒ Object
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 |
#modal(template = nil) ⇒ Object
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 |
#reload ⇒ Object
16 17 18 |
# File 'app/helpers/trestle/turbo/tag_builder.rb', line 16 def reload turbo_stream_action_tag :reload end |