class ViewComponent::Base

def strip_trailing_whitespace(value = true)

Parameters:
  • value (Boolean) -- Whether to strip newlines.

Deprecated:
  • Use the new component-local configuration option instead.
def strip_trailing_whitespace(value = true)
  ViewComponent::Deprecation.deprecation_warning(
    "strip_trailing_whitespace",
    <<~DOC
      Use the new component-local configuration option instead:
      class #{self.class.name} < ViewComponent::Base
        configure_view_component do |config|
          config.strip_trailing_whitespace = #{value}
        end
      end
    DOC
  )
  view_component_config.strip_trailing_whitespace = value
end