Skip to content

Commit

Permalink
Merge pull request sethvargo#38 from mwanji/master
Browse files Browse the repository at this point in the history
Create bootstrap_fields_for
  • Loading branch information
sethvargo committed Mar 28, 2012
2 parents 57fc974 + b7ca995 commit cf3843e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/bootstrap_forms/initializer.rb
Expand Up @@ -9,11 +9,16 @@ def bootstrap_form_for(record, options = {}, &block)
f.error_messages.html_safe + capture(f, &block).html_safe
end
end

def bootstrap_fields_for(record, options = {}, &block)
options[:builder] = BootstrapForms::FormBuilder
fields_for(record, nil, options, &block)
end
end
end
end

# don't wrap in those special divs
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance_tag|
html_tag
end
end

0 comments on commit cf3843e

Please sign in to comment.