Sha256: b07497439f7fc728e9b97903eb9427e092b6933eb3bb1f05fdf32029ce18294d

Contents?: true

Size: 520 Bytes

Versions: 133

Compression:

Stored size: 520 Bytes

Contents

module SimpleForm
  module Components
    module Errors
      def error_text
        begin
          if object.errors.details[attribute_name].map(&:values).flatten.include? :blank
            return
          end
        rescue StandardError => e
          pg_err e
        end
        text = has_custom_error? ? options[:error] : errors.reject(&:empty?).send(error_method)
        return if text.blank?

        "#{html_escape(options[:error_prefix])} #{html_escape(text)}".lstrip.html_safe
      end
    end
  end
end

Version data entries

133 entries across 133 versions & 1 rubygems

Version Path
pg_rails-7.1.4 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.1.3 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.1.2 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.1.1.pre.6 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.1.1.pre.5 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.1.1.pre.4 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.1.1.pre.3 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.1.1.pre.2 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.1.1.pre.1 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.1.0 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.0.8.pre.alpha.112 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.0.8.pre.alpha.111 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.0.8.pre.alpha.110 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.0.8.pre.alpha.109 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.0.8.pre.alpha.108 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.0.8.pre.alpha.107 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.0.8.pre.alpha.106 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.0.8.pre.alpha.105 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.0.8.pre.alpha.104 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.0.8.pre.alpha.103 pg_engine/config/initializers/simple_form_monkey_patch.rb