Module: CCS::FrontendHelpers::GovUKFrontend::CharacterCount

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

Overview

GOV.UK Character count

This helper is used for generating the character count component from the GDS - Components - Character count

Instance Method Summary collapse

Instance Method Details

#govuk_character_count(attribute, character_count_options = {}, **options) ⇒ Object

Generates the HTML for the GOV.UK Character count component



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

def govuk_character_count(attribute, character_count_options = {}, **options)
  Components::GovUK::Field::Input::CharacterCount.new(context: self, attribute: attribute, character_count_options: character_count_options, **options).render
end