Module: Voom::Presenters::Helpers::Route
- Includes:
- Namespace
- Defined in:
- lib/voom/presenters/helpers/route.rb
Instance Method Summary collapse
- #presenters_path(presenter, host: false, **params) ⇒ Object (also: #presenter_path)
-
#presenters_url(presenter, **params) ⇒ Object
(also: #presenter_url)
Full qualified URL.
Methods included from Namespace
Instance Method Details
#presenters_path(presenter, host: false, **params) ⇒ Object Also known as: presenter_path
7 8 9 10 11 |
# File 'lib/voom/presenters/helpers/route.rb', line 7 def presenters_path(presenter, host: false, **params) presenter = (presenter, namespace) presenter = presenter.gsub(':', '/') router.url(render: presenter, host: host, context: params) end |
#presenters_url(presenter, **params) ⇒ Object Also known as: presenter_url
Full qualified URL
16 17 18 |
# File 'lib/voom/presenters/helpers/route.rb', line 16 def presenters_url(presenter, **params) presenters_path(presenter, host: true, **params) end |