class ContactForm < Form text_field :subject, :max_length => 100 text_field :message email_field :sender boolean_field :cc_myself end f = ContactForm.new f.bound? #=> false data = { :subject => 'hello', :message => 'Hi there', :sender => 'foo@example.com', :cc_myself => true } f = ContactForm.new(data) f.bound? #=> true f.valid? #=> true f.render # or f.render_table #
#
#
#
f.render_ul #