Sha256: 0ae0e98c790916aa5e3c945b59826a442f68a795c6d58ceb7ce0092bcb26970d

Contents?: true

Size: 339 Bytes

Versions: 2

Compression:

Stored size: 339 Bytes

Contents

# frozen_string_literal: true

module Phlexi
  module Form
    module Components
      class Error < Base
        def view_template
          p(**attributes) do
            field.error
          end
        end

        private

        def render?
          field.show_errors? && field.has_errors?
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
phlexi-form-0.3.0.rc1 lib/phlexi/form/components/error.rb
phlexi-form-0.2.0 lib/phlexi/form/components/error.rb