README.md in restfulness-0.2.5 vs README.md in restfulness-0.2.6

- old
+ new

@@ -186,11 +186,24 @@ add 'journeys', Journeys::ListResource end end ``` +The `add` router method can also except a block which will be interpreted as a scope. The following example will provide the same paths as the `journeys` scope and resource defined above. The most important factor to take into account is that the `Journeys::ListResource` will be added to the route **after** the `active` and `terminated` resources. Order is important! +```ruby +routes do + scope 'api' do + add 'journeys', Journeys::ListResource do + add 'active', Journeys::ActiveResource + add 'terminated', Journeys::TerminatedResource + end + end +end +``` + + ### Resources Resources are like Controllers in a Rails project. They handle the basic HTTP actions using methods that match the same name as the action. The result of an action is serialized into a JSON object automatically. The actions supported by a resource are: * `get` @@ -602,9 +615,13 @@ * Support redirect exceptions. * Needs more functional testing. * Support for before and after filters in resources, although I'm slightly aprehensive about this. ## History + +### 0.2.6 - March 7, 2014 + + * Support scope block when adding a resource to router. (@samlown) ### 0.2.5 - March 7, 2014 * Added support for scope in routes. (@samlown)