Links
Smart form
Categories
Smart form
SmartForm
===
The form helper with intelligence!
Creates nicely laid out form fields for an ActiveRecord object, including it’s content columns and association reflections. The form fields are encapsulated in an HTML definition list.
Author: Michael Behan aka "Jabberwock" (jabberwock /AT tenebrous /DOT com; or Jabberwock on irc.freenode.net) Copyright: Copyright© 2007 Michael Behan, released under the BSD license For an example style-sheet via:
ruby script/generate SmartFormStyles
Usage:
smart_form_for(symbol, options)
Examples:
<% form_for people_url, :method => :post do %>
<%= smart_form_for :person %>
<% end %>
<% form_for edit_person_url(@person) do %>
<%= smart_form_for :person, :object => @person %>
<% end %>
For full documentation, including options, please visit vendor/plugins/smart_form/rdoc/index.html
Please feel free to e-mail me with feedback!
Enjoy :)
Michael Behan
Vitals
| Home | http://www.behanisms.com/ |
|---|---|
| Repository | git://github.com/jabberwock/smart_form.git |
| License | BSD |
| Tags |
actionview associations bitchin easy fds fields forms habtm jabberwock reflections scaffold smart useful
|
| Rating | (29 votes) |
| Owner | Jabberwock |
| Created | 25 April 2007 |
Comments
-
Please post a link with examples of how the smart forms look.
-
I will have this up soon :) Thanks!
-
I second the request for a live demo or screenshots. Would be most helpful.
-
Hey looks like it does not work with postgres database. generates this error: "126: The specified module could not be found. - c:/ruby/lib/ruby/gems/1.8/gems/ruby-postgres-0.7.1.2006.04.06-mswin32/./postgres.so" despite having the latest build for that gem. Otherwise it worked fine with mysql database.
-
This appears to be an issue with your postgres gem installation. SmartForm extends ActiveRecord and doesn't actually reference the database adapter directly. Have you tried the ruby-pr gem?
-
As promised, here is a simple demo:
http://admin.beta.ddna.org/smart_form_demo
-
How is order of items in the form determined?
-
By default, the display order is as it appears in the database (ie
DESCRIBE TABLEor\d table. I have added an :order option which takes an array of column/reflections for display order. Please svn up! -
Where are the labels coming from?
-
They're based on the column or reflection names.
-
Demo not working, I can't see how the form looks like.
-
Can't get from Repository
-
Repository still unavailable.
-
svn is not working, the site bleedingtrends.com is actually parked!
-
there's so much unreliable and dead plugins lately...

