module JqueryUiForm module Helpers module FormHelper def jquery_form_for(name, *args, &block) options = args.last.is_a?(Hash) ? args.pop : {} options[:builder] ||= JqueryUiForm::FormBuilder options[:html] ||= {} (options[:html][:class] ||= "") << " ui-form" form_for(name, *(args << options), &block) end def jquery_fields_for(name, *args, &block) options = args.last.is_a?(Hash) ? args.pop : {} options[:builder] ||= JqueryUiForm::FormBuilder fields_for(name, *(args << options), &block) end end end end