mmangino / elevated_form_builder
- Source
- Commits
- Network (2)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon Sep 22 14:08:18 -0700 2008 | |
| |
MIT-LICENSE | ||
| |
README | Sun Oct 12 17:24:33 -0700 2008 | |
| |
Rakefile | ||
| |
app/ | Fri Sep 05 05:18:09 -0700 2008 | |
| |
init.rb | ||
| |
install.rb | Sun Oct 12 17:53:51 -0700 2008 | |
| |
lib/ | ||
| |
tasks/ | ||
| |
test/ | ||
| |
uninstall.rb | Sun Oct 12 17:24:33 -0700 2008 |
README
ElevatedFormBuilder
===================
Form builder for Rails projects.
===================
You can edit app/views/forms/_field and app/views/forms/_field_with_errors partials to use the TemplateFormBuilder
If you want to use multiple form builders with different templates, you can subclass TemplateFormBuilder and override
template_without_error and template_with_error
Remember to put this in your application helper:
def error_handling_form_for(record_or_name_or_array, *args, &proc)
options = args.detect { |argument| argument.is_a?(Hash) }
if options.nil?
options = { :builder => TemplateFormBuilder }
args << options
end
options[:builder] = TemplateFormBuilder unless options.nil?
form_for(record_or_name_or_array, *args, &proc)
end
===================
Copyright (c) 2007 Elevated Rails, released under the MIT license
