Sha256: 11a61902da6da3d830e987cfbb15fbd6ba8a756b2454482688b2f82f514142ea

Contents?: true

Size: 456 Bytes

Versions: 2

Compression:

Stored size: 456 Bytes

Contents

module Puffer
  module Extensions
    module FormBuilder

      def puffer_field *args
        field = if args.first.is_a? Puffer::Fields::Field
          args.first
        else
          options = args.extract_options!
          Puffer::Fields::Field.new args, options
        end
        field.resource = object.class
        field.input self
      end

    end
  end
end

ActionView::Helpers::FormBuilder.send :include, Puffer::Extensions::FormBuilder

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puffer-0.0.20 lib/puffer/extensions/form.rb
puffer-0.0.19 lib/puffer/extensions/form.rb