Module: Airbed::Views

Defined in:
lib/airbed.rb

Instance Method Summary collapse

Instance Method Details

#form(options = {}) ⇒ Object



269
270
271
272
273
274
275
276
277
# File 'lib/airbed.rb', line 269

def form(options={})
  verb = method = options[:method] || :post
  options[:method] = :post unless [:get,:post].include? method.to_sym

  tag!(:form, options) {
    input(:type => 'hidden', :name => '_verb', :value => verb)
    yield
  }
end