Module: Bridgetown::Routes::ViewHelpers
- Defined in:
- lib/bridgetown-routes/view_helpers.rb
Defined Under Namespace
Classes: Flash
Instance Method Summary collapse
- #_blank_flash ⇒ Object
- #csrf_tag ⇒ Object
- #csrf_token ⇒ Object
- #flash ⇒ Object
- #request ⇒ Object (also: #r)
- #response ⇒ Object
- #roda_app ⇒ Object
Instance Method Details
#_blank_flash ⇒ Object
35 36 37 |
# File 'lib/bridgetown-routes/view_helpers.rb', line 35 def _blank_flash @_blank_flash ||= Flash.new end |
#csrf_tag ⇒ Object
39 40 41 |
# File 'lib/bridgetown-routes/view_helpers.rb', line 39 def csrf_tag(...) roda_app.csrf_tag(...) end |
#csrf_token ⇒ Object
43 44 45 |
# File 'lib/bridgetown-routes/view_helpers.rb', line 43 def csrf_token(...) roda_app.csrf_token(...) end |
#flash ⇒ Object
31 32 33 |
# File 'lib/bridgetown-routes/view_helpers.rb', line 31 def flash roda_app&.flash || _blank_flash end |
#request ⇒ Object Also known as: r
22 23 24 |
# File 'lib/bridgetown-routes/view_helpers.rb', line 22 def request roda_app&.request end |
#response ⇒ Object
27 28 29 |
# File 'lib/bridgetown-routes/view_helpers.rb', line 27 def response roda_app&.response end |
#roda_app ⇒ Object
18 19 20 |
# File 'lib/bridgetown-routes/view_helpers.rb', line 18 def roda_app view.resource&.roda_app end |