README.rdoc in restful_controller-0.1.4 vs README.rdoc in restful_controller-0.1.5

- old
+ new

@@ -25,10 +25,11 @@ Finally the resful macro is need it to setup our controller. This macro accepts 2 params: === Params * model: A requires parameter which is a symbol of the model name. +* route_prefix: A prefix string to be used with controller's url helper. * actions: An array of actions that a controller should implement, if none is passed then all seven REST actions are defined. === Examples Simple: @@ -41,9 +42,22 @@ end This definition will create the seven REST actions for Document model, this setup a single object instance variable @document and a collection variable @documents. + +Route prefix: + + class DocumentsController < ApplicationController + include Restful::Base + respond_to :html + + restful model: :document, route_prefix: 'admin' + end + +With *route_prefix* param every URL helper method in our controller will have the defined prefix. + +`edit_resource_path` helper method will call internally `admin_edit_resource_path`. Listed actions variation: The last parameter *actions* allows you to list in an array the actions that you want your controller to have: