instance method method_for_options

Ruby on Rails 8.0.4

Since v7.0.10 Private

Available in: v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

method_for_options(options)

No documentation comment.

Parameters

options req
Source
# File actionview/lib/action_view/helpers/url_helper.rb, line 723
        def method_for_options(options)
          if options.is_a?(Array)
            method_for_options(options.last)
          elsif options.respond_to?(:persisted?)
            options.persisted? ? :patch : :post
          elsif options.respond_to?(:to_model)
            method_for_options(options.to_model)
          end
        end

Defined in actionview/lib/action_view/helpers/url_helper.rb line 723 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionView::Helpers::UrlHelper

Type at least 2 characters to search.

↑↓ navigate · open · esc close