instance method prepend_view_path

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

prepend_view_path(path)

Adds a view_path to the front of the view_paths array. This change affects the current request only.

self.prepend_view_path("views/default")
self.prepend_view_path(["views/default", "views/custom"])

Parameters

path req
Source
# File actionpack/lib/action_controller/base.rb, line 667
      def prepend_view_path(path)
        @template.view_paths.unshift(*path)
      end

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

Defined in ActionController::Base

Type at least 2 characters to search.

↑↓ navigate · open · esc close