haml_scaffold
haml_scaffold copied to clipboard
Core rails scaffolding with haml replacements for the views
This plugin has recently gone under major reconstruction. Please refer to this readme for updated options.
HamlScaffold
This plugin creates scaffolds with .html.haml views rather than the traditional .haml.erb views, and creates Sass stylesheets instead of the traditional .css stylesheets.
Additional ui frameworks have been added: jQuery & jQuery-ui for javascript and BlueprintCSS for css.
Also, form error messages are now displayed inline using the label tag.
Requires
Rails 2.2.0+ Haml
Install
install this as a plugin to your rails app with ./script/plugin install git://github.com/cnaths/haml_scaffold.git
be sure to include the haml plugin in your rails app with: ./haml --rails [path/to/app] *see haml for more info
Example
./script/generate haml_scaffold Post title:string body:text
Options
--layout //Generate layout components --erb //Generate erb views/layouts and css stylesheets rather than haml/sass --skip-timestamps //Don't add timestamps to the migration file for this model --skip-migration //Don't generate a migration file for this model
Notes
"ActionView::Base.default_form_builder = InlineFormErrors" will be added to your environment.rb file during installation. This is to give error messages inside input labels. Delete this line to restore default form builder functionality.
include tags will be written to the layouts/_includes partial during scaffolding
Released under the MIT license