Sha256: b07497439f7fc728e9b97903eb9427e092b6933eb3bb1f05fdf32029ce18294d

Contents?: true

Size: 520 Bytes

Versions: 132

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

132 entries across 132 versions & 1 rubygems

Version Path
pg_rails-7.6.27 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.26 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.25 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.24 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.24.pre.5 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.24.pre.4 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.24.pre.3 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.23 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.22 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.22.pre.3 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.22.pre.2 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.22.pre.1 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.21 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.21.pre.11 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.21.pre.10 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.21.pre.9 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.21.pre.8 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.21.pre.7 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.21.pre.6 pg_engine/config/initializers/simple_form_monkey_patch.rb
pg_rails-7.6.21.pre.5 pg_engine/config/initializers/simple_form_monkey_patch.rb