README.textile in grimen-dry_scaffold-0.2.1 vs README.textile in grimen-dry_scaffold-0.2.2
- old
+ new
@@ -266,14 +266,16 @@
* @update@
* @destroy@
Default controller action stubs, controller action test stubs, and corresponding views (and required partials), are generated for all of these actions.
-These default actions can also be included using the alias symbol @*@, which makes it easier to add new actions without having to specify all the default actions explicit. Example:
+These default actions can also be included using the quantifiers @*@ and @+@, which makes it easier to add new actions without having to specify all the default actions explicit. Example:
-<pre>_actions:quack # => quack</pre>
-<pre>_actions:*,quack # => show,index,new,edit,create,update,destroy,quack</pre>
+<pre>_actions:quack # => quack</pre>
+<pre>_actions:*,quack # => show,index,new,edit,create,update,destroy,quack</pre>
+<pre>_actions:new+,edit,quack # => new,edit,create,quack</pre>
+<pre>_actions:new+,edit+,quack # => new,edit,create,update,quack</pre>
h4. Custom Actions
The above REST actions are in many RESTful applications the only ones needed. Any other specified actions will generate empty action function stubs for manual implementation. No views will be generated for custom actions.
@@ -289,12 +291,12 @@
h4. Default Formats
If no formats are specified, the following formats will be generated by default:
-* @html@ => Render: resource using view template (HTML/HAML)
-* @js@ => Render: resource using view template (JS/RJS)
+* @html@ => Template: resource.html.haml
+* @js@ => Template: resource.js.rjs
* @xml@ => Render: resource.to_xml
* @json@ => Render: resource.to_json
Default respond block stubs are generated for all of these formats - for each generated REST-action.
@@ -305,15 +307,42 @@
h4. Additional Formats
Also, default respond block stubs are generated for any of these formats - for each generated REST-action - if they are specified:
-* @yaml@ or @yml@ => Render: resource.to_yaml
-* @txt@ or @text@ => Render: resource.to_s
+* @atom@ => Template: index.atom.builder
+* @rss@ => Template: index.rss.builder
+* @yaml@/@yml@ => Render: resource.to_yaml
+* @txt@/@text@ => Render: resource.to_s
-NOTE: Only for Non-InheritedResources controllers for now.
+NOTE: Only for Non-InheritedResources controllers for now.
+For the feed formats @atom@ and @rss@, builders are automatically generated if @index@-action is specified. Example:
+
+@app/views/ducks/index.atom.builder@
+
+<pre>
+ atom_feed(:language => I18n.locale) do |feed|
+ feed.title 'Resources'
+ feed.subtitle 'Index of all resources.'
+ feed.updated (@resources.first.created_at rescue Time.now.utc).strftime('%Y-%m-%dT%H:%M:%SZ'))
+
+ @resources.each do |resource|
+ feed.entry(resource) do |entry|
+ entry.title 'title'
+ entry.summary 'summary'
+
+ resource.author do |author|
+ author.name 'author_name'
+ end
+ end
+ end
+ end
+</pre>
+
+Builder generation can be skipped by specifying the @--skip-builders@ flag.
+
h4. Custom Formats
The above formats are the most commonly used ones, and respond blocks are already implemented using Rails default dependencies. Any other specified formats (such as PDF, CSV, etc.) will generate empty respond block stubs for manual implementation with help of additional dependencies.
h3. Model Indexes
@@ -346,9 +375,10 @@
* @--skip-resourceful@ - Don't generate resourceful controller, i.e. don't use *inherited_resources*.
* @--skip-formtastic@ - Don't generate formtastic forms in views, i.e. don't use *formtastic*.
* @--skip-views@ - Don't generate views.
* @--skip-helpers@ - Don't generate helpers.
* @--skip-tests@ - Don't generate tests (functional/unit/...).
+* @--skip-builders@ - Don't generate builders.
* @--layout@ - Generate layout.
h4. Model-specific
* @--fixtures@ - Generate fixtures.
\ No newline at end of file