module GovukPublishingComponents

Constants

VERSION

Public Class Methods

configure() { |Config| ... } click to toggle source
# File lib/govuk_publishing_components/config.rb, line 2
def self.configure
  yield(Config)
end
render(component, options = {}) click to toggle source
# File lib/govuk_publishing_components.rb, line 54
def self.render(component, options = {})
  I18n.with_locale(options.fetch(:locale, "en")) do
    renderer = ActionController::Base.renderer
    renderer.render(partial: component, locals: options)
  end
end