Sha256: b443d282b8e89d83d2fe97edaea7abb9df10b0631140d0ba093ca63a1e195f5d

Contents?: true

Size: 481 Bytes

Versions: 13

Compression:

Stored size: 481 Bytes

Contents

module Puffer
  module Inputs
    class Select < Puffer::Inputs::Base

      def input
        options = case field.options[:select]
          when Symbol then
            send field.options[:select]
          when Proc then
            field.options[:select].bind(temptate).call
          else
            field.options[:select]
        end
        builder.select field, options, {:include_blank => field.options[:include_blank]}, field.input_options
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
puffer-0.0.23 lib/puffer/inputs/select.rb
puffer-0.0.22 lib/puffer/inputs/select.rb
puffer-0.0.21 lib/puffer/inputs/select.rb
puffer-0.0.20 lib/puffer/inputs/select.rb
puffer-0.0.19 lib/puffer/inputs/select.rb
puffer-0.0.18 lib/puffer/inputs/select.rb
puffer-0.0.17 lib/puffer/inputs/select.rb
puffer-0.0.16 lib/puffer/inputs/select.rb
puffer-0.0.15 lib/puffer/inputs/select.rb
puffer-0.0.14 lib/puffer/inputs/select.rb
puffer-0.0.13 lib/puffer/inputs/select.rb
puffer-0.0.12 lib/puffer/inputs/select.rb
puffer-0.0.11 lib/puffer/inputs/select.rb