make_resourceful do
actions :all
response_for :new, :edit do |format|
format.html { render :template => 'controller_name/form' }
end
end
Haml, form.html.haml, and make_resource are all great but it gets old generating a scaffold or controller and now you have to go convert all the files to haml, delete new and edit files and create form.html.haml, and delete your controller code to replace it with make_resourcefull. With that much editing it hardly makes using the scaffold generator worthwhile.
This is why I created my_sleek_rails_generators. Which has all the same functionality as rails scaffold and controller generators. You even use the respective generators with the same syntax on the command line.
You can can get the plugin here: http://www.tomonrails.com/docs/my_sleek_rails_generators.tar.gz
Now you have a scaffold generator that you can actually enjoy using without a whole bunch of code re-write.
NOTE: I plan to keep updating this plugin with more generators for different things, so make sure to keep it updated for the latest and greatest generators.
No comments:
Post a Comment