ianwhite / inherit_views
- Source
- Commits
- Network (3)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
5d52a37
commit 5d52a37a5c68ea541d5d958c797849fed2443632
tree 4c56f63aea77b984bd6654214eeb6fb63ddc2fa6
parent 3afda8be6322bf8cc56d5876b695a95c2dfa1dc7
tree 4c56f63aea77b984bd6654214eeb6fb63ddc2fa6
parent 3afda8be6322bf8cc56d5876b695a95c2dfa1dc7
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
CHANGELOG | ||
| |
MIT-LICENSE | ||
| |
README.rdoc | ||
| |
Rakefile | ||
| |
SPECDOC | ||
| |
garlic_example.rb | ||
| |
init.rb | ||
| |
lib/ | ||
| |
spec/ |
README.rdoc
plugins.ardes.com > inherit_views
inherit_views
This plugin allows your controllers to inherit their views from parent controllers. The default behaviour is to inherit along the ancestor path of the controller, but you can also specify custom inherit view paths to search.
NOTE: this plugin is not aimed at having multiple view paths for your controllers, which is addressed with the view_paths addition to ActionController::Base for rails 2.0. Rather, within these view paths, you can inherit views from other controller paths.
Example:
class ApplicationController < ActionController::Base
inherit_views
end
class FooController < ApplicationController
# will look for views in 'views/foo', then 'views/application'
end
class BarController < FooController
# will look for views in 'views/bar', then 'views/foo', then 'view/application'
end
You can also render the parent view in your views with
<%= render_parent %>
See Ardes::InheritViews for more details
Specs and Coverage
- SPECDOC lists the specifications
- RSpec Report is a report of spec pass/fails
- RCov Report is the rcov report
Testing
RSpec is used for testing, so the tests are in spec/ rather than test/ Do rake —tasks for more details.

