app/helpers/booter_helper.rb in booter-0.3.1 vs app/helpers/booter_helper.rb in booter-1.0.0.rc1
- old
+ new
@@ -1,8 +1,13 @@
module BooterHelper
def nice_form_for(object, options = {}, &block)
options[:builder] = BootstrapFormBuilder
options[:html] ||= {}
options[:html][:class] = 'form-horizontal'
- form_for(object, options, &block)
+
+ if options[:modal]
+ render 'booter/modal_form', object: object, options: options, block: block
+ else
+ form_for(object, options, &block)
+ end
end
end