Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Dynamic Scaffold Resource

Dynamic Scaffold Resource

= DynamicScaffoldResource Adds basic REST scaffolding to calling controller. = By Tim Connor http://www.timocracy.com === link:../MIT-LICENSE === homepage[http://code.google.com/p/dynamic-scaffold-resource/] ===================

==== Requirements Obviously, this was developed against a version of Rails with the REST functionality included, Edge in fact.

==== Install notes It should just run out of the box as of 0.4. If you wish you can apply the link:../optional.patch yourself, and then comment out the appropriate line in link:../init.rb that sends the method redefinition to ActiveView.Base. If the http://dev.rubyonrails.org/ticket/6413 and http://dev.rubyonrails.org/ticket/6412 get applied to Rails, then again, just comment out the line in init.

==== Usage Don’t forget to add your route “map.resources :model_name”. Then just call “scaffold_resource :model_name” in your ModelNamesController and it will have the basic REST actions added, as well as their views.

==== DynamicResourceTestHelper I separated out the tests that I used to test the plugin that correspond to the generated tests for the REST actions and put them in a pseudo-helper, so you can have a tested controller from step 1.

If you want to use it, “include DynamicScaffoldResourceTestHelper” in your functional controller, and set @scaffold_singular_name in your setup. There are a couple other variables you can set, as well, to get it to pass authentication and validation requirements, for instance. See the docs for details.

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly

Users


See all details


Membership

+ Join this railsplugin

Record Maintainer

'None'