Module: GovukDesignSystem::BackLinkHelper
- Defined in:
- app/helpers/govuk_design_system/back_link_helper.rb
Instance Method Summary collapse
-
#govukBackLink(href:, text: nil, html: nil, classes: "", attributes: {}) ⇒ Object
Use the [back link component](design-system.service.gov.uk/components/back-link/) to help users go back to the previous page in a multi-page transaction.
Instance Method Details
#govukBackLink(href:, text: nil, html: nil, classes: "", attributes: {}) ⇒ Object
Use the [back link component](design-system.service.gov.uk/components/back-link/) to help users go back to the previous page in a multi-page transaction.
Code based upon [nunjucks template](github.com/alphagov/govuk-frontend/blob/master/src/govuk/components/back-link/template.njk)
7 8 9 10 11 |
# File 'app/helpers/govuk_design_system/back_link_helper.rb', line 7 def govukBackLink(href:, text: nil, html: nil, classes: "", attributes: {}) attributes[:class] = "govuk-back-link #{classes}" link_to (html || text), href, attributes end |