Sha256: dceb76e307e5f6c881ca9e267dcfeb4b052600f161321f2e0afa3dff22788c95
Contents?: true
Size: 729 Bytes
Versions: 6
Compression:
Stored size: 729 Bytes
Contents
module Uberkit::Forms::Helper def parse_options(*args) options = args.extract_options! options.merge!(:builder => Uberkit::Forms::Builder) options[:html] ||= {} class_names = options[:html][:class] ? options[:html][:class].split(" ") : [] class_names << "uberform" class_names << options.delete(:kind).to_s options[:html][:class] = class_names.join(" ") args << options end def uberform_for(name_or_object_or_array, *args, &proc) args = parse_options(*args) form_for(name_or_object_or_array, *args, &proc) end def remote_uberform_for(name_or_object_or_array, *args, &proc) args = parse_options(*args) remote_form_for(name_or_object_or_array, *args, &proc) end end
Version data entries
6 entries across 6 versions & 2 rubygems