method
append_view_path
Ruby on Rails latest stable (v2.3.4)
-
1 note -
Class: ActionController::Base
- v1.0.0
- v1.1.0
- v1.1.1
- v1.1.2
- v1.1.3
- v1.1.4
- v1.1.5
- v1.1.6
- v1.2.0
- v1.2.1
- v1.2.2
- v1.2.3
- v1.2.4
- v1.2.5
- v1.2.6
- 2.0.0 (0)
- 2.0.1 (0)
- 2.0.2 (0)
- 2.0.3 (0)
- 2.1.0 (-38)
- 2.2.1 (0)
- 2.3.2 (0)
- 2.3.4 (0)
- What's this?
append_view_path(path)
public
Adds a view_path to the end of the view_paths array. If the current class has no view paths, copy them from the superclass. This change will be visible for all future requests.
ArticleController.append_view_path("views/default") ArticleController.append_view_path(["views/default", "views/custom"])
Register or
log in
to add new notes.
subblue -
June 26, 2008
8 thanks
Handy for adding theme support
I’m using this to add basic theme support to my app:
append_view_path(File.join(RAILS_ROOT, "app/themes/#{@current_theme}")) append_view_path(File.join(RAILS_ROOT, 'app/themes/_base'))
Common templates go in app/themes/_base and then you can override these with specific theme versions in each theme directory.

