Module: CCS::FrontendHelpers::GovUKFrontend::ExitThisPage

Included in:
CCS::FrontendHelpers::GovUKFrontend
Defined in:
lib/ccs/frontend_helpers/govuk_frontend/exit_this_page.rb

Overview

GOV.UK Exit this page

This is used to generate the exit this page component from the GDS - Components - Exit this page

Instance Method Summary collapse

Instance Method Details

#govuk_exit_this_page(text = nil, redirect_url = nil) ⇒ ActiveSupport::SafeBuffer

Generates the HTML for the GOV.UK Exit this page component

Parameters:

  • text (String) (defaults to: nil)

    the text for the exit this page

  • redirect_url (String) (defaults to: nil)

    the href for the exit this page

  • options (Hash)

    options that will be used in customising the HTML

Returns:

  • (ActiveSupport::SafeBuffer)


22
23
24
# File 'lib/ccs/frontend_helpers/govuk_frontend/exit_this_page.rb', line 22

def govuk_exit_this_page(text = nil, redirect_url = nil, **)
  Components::GovUK::ExitThisPage.new(context: self, text: text, redirect_url: redirect_url, **).render
end