Sha256: 942691dfd94fab1c42e0169b5519c3a4b6b36771039b4a8fba4cce4356e6220f

Contents?: true

Size: 465 Bytes

Versions: 11

Compression:

Stored size: 465 Bytes

Contents

module Trestle
  class Form
    extend ActiveSupport::Autoload

    autoload :Automatic
    autoload :Builder
    autoload :Field
    autoload :Fields
    autoload :Renderer

    attr_reader :options, :block

    def initialize(options={}, &block)
      @options, @block = options, block
    end

    def dialog?
      options[:dialog] == true
    end

    def render(template, instance)
      Renderer.new(template).render_form(instance, &block)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
trestle-0.9.2 lib/trestle/form.rb
trestle-0.9.1 lib/trestle/form.rb
trestle-0.9.0 lib/trestle/form.rb
trestle-0.8.13 lib/trestle/form.rb
trestle-0.8.12 lib/trestle/form.rb
trestle-0.8.11 lib/trestle/form.rb
trestle-0.8.10 lib/trestle/form.rb
trestle-0.8.9 lib/trestle/form.rb
trestle-0.8.8 lib/trestle/form.rb
trestle-0.8.7 lib/trestle/form.rb
trestle-0.8.6 lib/trestle/form.rb