README.rdoc in inherited_resources-1.2.1 vs README.rdoc in inherited_resources-1.2.2
- old
+ new
@@ -13,29 +13,27 @@
== Installation
=== Rails 3
-Inherited Resources master branch is now supports Rails 3 and is NOT backward compatible.
+You can let bundler install Inherited Resources by adding this line to your application's Gemfile:
-You can let bundler to install Inherited Resources by adding this line to your application's Gemfile:
+ gem 'inherited_resources'
- gem 'inherited_resources', '~> 1.2.1'
-
And then execute:
bundle install
Or install it yourself as:
- gem install inherited_resources --version=1.2.1
+ gem install inherited_resources
=== Rails 2.3.x
If you want to use the Rails 2.3.x version, you should install:
- sudo gem install inherited_resources --version=1.0.6
+ gem install inherited_resources --version=1.0.6
Or checkout from the v1.0 branch:
http://github.com/josevalim/inherited_resources/tree/v1.0
@@ -69,10 +67,12 @@
Using responders will set the flash message to :notice and :alert. You can change
that through the following configuration value:
InheritedResources.flash_keys = [ :success, :failure ]
+Notice the CollectionResponder won't work with InheritedResources, as InheritedResources hardcodes the redirect path based on the current scope (like belongs to, polymorphic associations, etc).
+
== Basic Usage
To use Inherited Resources you just have to inherit (duh) it:
class ProjectsController < InheritedResources::Base
@@ -292,10 +292,10 @@
in destroy action calculate in following order collection_url, parent_url, root_url.
Example:
class ButtonsConntroller < InheritedResources::Base
- belong_to :window
+ belongs_to :window
actions :all, :except => [:show, :index]
end
This controller redirect to parent window after all CUD actions.