-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
41 lines (27 loc) · 872 Bytes
/
README
File metadata and controls
41 lines (27 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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