Make possible to specify custom builder.
This commit is contained in:
parent
3a4fe9ca30
commit
968e9325b5
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue