public
Description: rails plugin that enables inheritance of views along a controller class heirachy
Homepage: http://ianwhite.github.com/inherit_views
Clone URL: git://github.com/ianwhite/inherit_views.git
name age message
file .gitignore Loading commit data...
file History.txt
file License.txt Fri Feb 06 01:09:38 -0800 2009 Simplify Rakefile, README, etc [ianwhite]
file README.rdoc
file Rakefile
file Todo.txt Fri Feb 06 01:09:38 -0800 2009 Simplify Rakefile, README, etc [ianwhite]
file garlic.rb
file init.rb
directory lib/
directory spec/
README.rdoc

ianwhite / inherit_views

Status

inherit_views works with rails 2.x

If you’re on rails master (2.3), you want inherit_views/master

If you’re on rails 2.2, you want inherit_views/rails-2.2

If you’re on rails 2.0, or 2.1, you want inherit_views/rails-2.0-2.1

what does it do?

This rails 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.

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

See InheritViews for more details

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.

Testing & CI

RSpec is used for testing, so the tests are in spec/ rather than test/ Do rake —tasks for more details.

garlic is used for CI, see garlic.rb for details on what versions of rails are tested.

Contributors

Author: Ian W. White

Contributions by: