Module: Bridgetown::Routes::ViewHelpers
- Included in:
- Bridgetown::RubyTemplateView::Helpers
- Defined in:
- bridgetown-routes/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
47 48 49 |
# File 'bridgetown-routes/lib/bridgetown-routes/view_helpers.rb', line 47 def _blank_flash @_blank_flash ||= Flash.new end |
#csrf_tag ⇒ Object
51 52 53 |
# File 'bridgetown-routes/lib/bridgetown-routes/view_helpers.rb', line 51 def csrf_tag(...) roda_app.csrf_tag(...) end |
#csrf_token ⇒ Object
55 56 57 |
# File 'bridgetown-routes/lib/bridgetown-routes/view_helpers.rb', line 55 def csrf_token(...) roda_app.csrf_token(...) end |
#flash ⇒ Object
43 44 45 |
# File 'bridgetown-routes/lib/bridgetown-routes/view_helpers.rb', line 43 def flash roda_app&.flash || _blank_flash end |
#request ⇒ Object Also known as: r
34 35 36 |
# File 'bridgetown-routes/lib/bridgetown-routes/view_helpers.rb', line 34 def request roda_app&.request end |
#response ⇒ Object
39 40 41 |
# File 'bridgetown-routes/lib/bridgetown-routes/view_helpers.rb', line 39 def response roda_app&.response end |
#roda_app ⇒ Object
30 31 32 |
# File 'bridgetown-routes/lib/bridgetown-routes/view_helpers.rb', line 30 def roda_app view.resource&.roda_app end |