instance method map_associations

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18 Private

Available in: v2.2.3 v2.3.18

Signature

map_associations(resource, options)

No documentation comment.

Parameters

resource req
options req
Source
# File actionpack/lib/action_controller/resources.rb, line 550
      def map_associations(resource, options)
        map_has_many_associations(resource, options.delete(:has_many), options) if options[:has_many]

        path_prefix = "#{options.delete(:path_prefix)}#{resource.nesting_path_prefix}"
        name_prefix = "#{options.delete(:name_prefix)}#{resource.nesting_name_prefix}"

        Array(options[:has_one]).each do |association|
          resource(association, options.slice(*INHERITABLE_OPTIONS).merge(:path_prefix => path_prefix, :name_prefix => name_prefix))
        end
      end

Defined in actionpack/lib/action_controller/resources.rb line 550 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::Resources

Type at least 2 characters to search.

↑↓ navigate · open · esc close