Flowdock
method

apply_form_for_options!

Importance_0
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActionView::Helpers::FormHelper
apply_form_for_options!(record, object, options) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_view/helpers/form_helper.rb, line 441
      def apply_form_for_options!(record, object, options) #:nodoc:
        object = convert_to_model(object)

        as = options[:as]
        action, method = object.respond_to?(:persisted?) && object.persisted? ? [:edit, :patch] : [:new, :post]
        options[:html].reverse_merge!(
          class:  as ? "#{action}_#{as}" : dom_class(object, action),
          id:     as ? "#{action}_#{as}" : [options[:namespace], dom_id(object, action)].compact.join("_").presence,
          method: method
        )

        options[:url] ||= polymorphic_path(record, format: options.delete(:format))
      end
Register or log in to add new notes.