You are here: Browse Railsplugins Resources Controller
http://plugins.ardes.com > resources_controller
= resources_controller
plugin to facilitate inheritance and DRYness in your resources controllers
Simple Usage (see Ardes::ResourcesController for more)
class ThingsController < ApplicationController
resources_controller_for :things
end
Also supports nested resources
class CommentsController < ApplicationController
resources_controller_for :comments, :in => [:forum, :post]
end
Also support polymorphic associations, and arbitrary nesting
class TagsController < ApplicationController
resources_controller_for :tags
nested_in :taggable, :polymorphic => true, :load_enclosing => true
end
=== For Rails <= 1.2.2
If you are using non-edge rails <= 1.2.2 you should also install http://svn.ardes.com/rails_plugins/resources_controller_lte_1_2_2
(To tell if you need the patch you can run the specs via rake – if you get failures to do with resource service, then you need the patch)
=== ContributorsSee the {CHANGLELOG}[link:files/CHANGELOG.html] for recent changes
=== Specs and Coverage=== Testing
RSpec is used for testing, so the tests are in spec/ rather than test/ Do rake—tasks for more details.
NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly