Sha256: 6211e060e40bcda82d27faffe9ca88ca195604977358474b4414f0a372cbf66d

Contents?: true

Size: 236 Bytes

Versions: 3

Compression:

Stored size: 236 Bytes

Contents

module SimpleForm
  module Helpers
    module HasErrors
      private

      def errors
        object.errors
      end

      def has_errors?
        object && object.respond_to?(:errors) && errors.present?
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
simple_form-1.5.2 lib/simple_form/helpers/has_errors.rb
simple_form-1.5.1 lib/simple_form/helpers/has_errors.rb
simple_form-1.5.0 lib/simple_form/helpers/has_errors.rb