public
Description: Plugin that provides an automatic forms generation
Homepage: http://github.com/maxime/merb-simple-forms
Clone URL: git://github.com/maxime/merb-simple-forms.git
name age message
file .gitignore Wed Nov 05 08:58:42 -0800 2008 Ignore .DS_Store files [maxime]
file Generators Loading commit data...
file LICENSE Sun Sep 14 12:38:52 -0700 2008 first commit [maxime]
file README Sun Sep 14 12:58:50 -0700 2008 Add installation instructions [maxime]
file Rakefile Wed Nov 05 08:58:04 -0800 2008 A lot of new generators [maxime]
file TODO Sun Sep 14 12:38:52 -0700 2008 first commit [maxime]
directory lib/
directory spec/ Sun Sep 14 12:52:46 -0700 2008 Import the simple forms helpers [maxime]
directory test/ Sun Sep 14 12:38:52 -0700 2008 first commit [maxime]
README
merb-simple-forms
=================

A plugin for the Merb framework that provides an automatic form generation.

How to use?
===========

1. install merb-simple-forms

git clone git://github.com/maxime/merb-simple-forms.git
cd merb-simple-forms
sudo rake install

2. dependency ""merb-simple-forms" in your config/init.rb

3. add include Merb::Helpers::SimpleFormsHelpers to app/controllers/application.rb

4. add the form definition to your model:

def self.form_definition
  {:attributes =>  [
      {:email => {:control => :text_field}},
      {:password => {:control => :password_field}},
      {:password_confirmation => {:control => :password_field, :label => "Please confirm your password"}}
      ]}
end

5. use the render_form for rendering your form:

<%= render_form :user %>

6. you're done!


TODO
====

- write specs
- clean up some code
- add documentation