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 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 to help users go back to the previous page in a multi-page transaction.
Code based upon nunjucks template
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 |