Sha256: aac6fa163181b2fc00c5041e5625b94690ad985b51ad645d93206f88bd65e98f

Contents?: true

Size: 438 Bytes

Versions: 5

Compression:

Stored size: 438 Bytes

Contents

module Puffer
  module Extensions
    module FormBuilder

      def puffer_field *args
        field = args.first.is_a?(Puffer::Field) ? args.first : Puffer::Field.new(*args)
        field.resource = object.class
        template = instance_variable_get :@template
        field.render template.controller, :form, :form => self
      end

    end
  end
end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
puffer-0.0.29 lib/puffer/extensions/form.rb
puffer-0.0.28 lib/puffer/extensions/form.rb
puffer-0.0.26 lib/puffer/extensions/form.rb
puffer-0.0.25 lib/puffer/extensions/form.rb
puffer-0.0.24 lib/puffer/extensions/form.rb