Make possible to specify custom builder.

This commit is contained in:
Johan Andersson 2011-01-05 20:51:31 +01:00
parent 3a4fe9ca30
commit 968e9325b5
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ module SimpleForm
class_eval <<-METHOD, __FILE__, __LINE__
def simple_#{helper}(record_or_name_or_array, *args, &block)
options = args.extract_options!
options[:builder] = SimpleForm::FormBuilder
options[:builder] ||= SimpleForm::FormBuilder
css_class = case record_or_name_or_array
when String, Symbol then record_or_name_or_array.to_s
when Array then dom_class(record_or_name_or_array.last)