Sha256: c366603a77da25629ae7851acde3b1eabc0281998afecbe027b72f002364d92a
Contents?: true
Size: 1.26 KB
Versions: 13
Compression:
Stored size: 1.26 KB
Contents
module Symphonia module FormHelper def symphonia_form_for(object, options={}, &block) options.reverse_merge!(builder: Symphonia::FormBuilder) options = process_options(options) unless options[:remote] && options[:local].nil? options[:local] = true end if (as = options[:as]) options[:scope] ||= as end with_bootstrap_form_field_error_proc do form_for(object, options, &block) end end # def symphonia_form_for(object, options = {}, &block) # options.reverse_merge!({ builder: Symphonia::FormBuilder }) # # options[:html] ||= {} # options[:html][:role] ||= 'form' # # if options[:layout] == :inline # options[:html][:class] = [options[:html][:class], 'form-inline'].compact.join(' ') # end # # unless options[:remote] && options[:local].nil? # options[:local] = true # end # if (as = options[:as]) # options[:scope] ||= as # end # # temporarily_disable_field_error_proc do # form_for(object, options, &block) # end # # end def symphonia_form_tag(options = {}, &block) options[:acts_like_form_tag] = true symphonia_form_for("", options, &block) end end end
Version data entries
13 entries across 13 versions & 1 rubygems