Sha256: 837eab6693302dc7a2f2e7d920aa10d08416b2a5e8048cb4524f9bd62949b0db

Contents?: true

Size: 493 Bytes

Versions: 9

Compression:

Stored size: 493 Bytes

Contents

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 form_for(name, *args, &block)
      #   super(name, *args, &block)
      # end
      
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
jquery-ui-form-0.2.1 lib/jquery_ui_form/helpers/form_helper.rb
jquery-ui-form-0.2.0 lib/jquery_ui_form/helpers/form_helper.rb
jquery-ui-form-0.1.6 lib/jquery_ui_form/helpers/form_helper.rb
jquery-ui-form-0.1.5 lib/jquery_ui_form/helpers/form_helper.rb
jquery-ui-form-0.1.4 lib/jquery_ui_form/helpers/form_helper.rb
jquery-ui-form-0.1.3 lib/jquery_ui_form/helpers/form_helper.rb
jquery-ui-form-0.1.2 lib/jquery_ui_form/helpers/form_helper.rb
jquery-ui-form-0.1.1 lib/jquery_ui_form/helpers/form_helper.rb
jquery-ui-form-0.1.0 lib/jquery_ui_form/helpers/form_helper.rb