Sha256: c5a7f7c511cffe723fd80b9dc0a97af1e147220f41a7cf30f598275dc315ce73

Contents?: true

Size: 419 Bytes

Versions: 1

Compression:

Stored size: 419 Bytes

Contents

module KisoThemes
  module SimpleForm
    # Custom SimpleForm component to render errors with a fancy icon.
    module ErrorTag
      def error_tag(wrapper_options = nil)
        return unless has_errors?
        template.content_tag(:span, template.fa_icon_tag("remove") + " " + error_text, :class => "help-block")
      end
    end
  end
end

SimpleForm::Inputs::Base.send(:include, KisoThemes::SimpleForm::ErrorTag)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kiso_themes-1.0.2 lib/kiso_themes/extensions/simple_form/errors_component.rb