Sha256: fb64037fe452f00cb5def7b503aa57e70f5109a47717a13c759bdb3b929f399a

Contents?: true

Size: 635 Bytes

Versions: 12

Compression:

Stored size: 635 Bytes

Contents

module SimpleForm
  module Inputs
    class PriorityInput < CollectionSelectInput
      def input(wrapper_options = nil)
        merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)

        @builder.send(:"#{input_type}_select", attribute_name, input_priority,
                      input_options, merged_input_options)
      end

      def input_priority
        options[:priority] || SimpleForm.send(:"#{input_type}_priority")
      end

      protected

      def has_required?
        false
      end

      def skip_include_blank?
        super || input_priority.present?
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
simple_form-3.5.0 lib/simple_form/inputs/priority_input.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/simple_form-3.4.0/lib/simple_form/inputs/priority_input.rb
simple_form-3.4.0 lib/simple_form/inputs/priority_input.rb
simple_form-3.3.1 lib/simple_form/inputs/priority_input.rb
simple_form-3.3.0 lib/simple_form/inputs/priority_input.rb
simple_form-3.2.1 lib/simple_form/inputs/priority_input.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/simple_form-3.2.0/lib/simple_form/inputs/priority_input.rb
simple_form-3.2.0 lib/simple_form/inputs/priority_input.rb
simple_form-3.1.1 lib/simple_form/inputs/priority_input.rb
simple_form-3.1.0 lib/simple_form/inputs/priority_input.rb
simple_form-3.1.0.rc2 lib/simple_form/inputs/priority_input.rb
simple_form-3.1.0.rc1 lib/simple_form/inputs/priority_input.rb