tangofoxtrot / haml_scaffold forked from cnaths/haml_scaffold
- Source
- Commits
- Network (5)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
Richard Luther (author)
Wed Oct 07 22:23:44 -0700 2009
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Thu Sep 11 16:48:19 -0700 2008 | |
| |
README | ||
| |
Rakefile | Thu Sep 11 16:48:19 -0700 2008 | |
| |
generators/ | ||
| |
init.rb | Thu Sep 11 16:48:19 -0700 2008 | |
| |
install.rb | Thu Sep 11 16:48:19 -0700 2008 | |
| |
tasks/ | Thu Sep 11 16:48:19 -0700 2008 | |
| |
test/ | Thu Sep 11 16:48:19 -0700 2008 | |
| |
uninstall.rb | Thu Sep 11 16:48:19 -0700 2008 |
README
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. Otherwise, all other aspects of the core rails scaffolding is intact. Requires ======= Rails 2.1.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 Notes ======= This is a modified version of haml_scaffold. I've tweaked it to work for my needs. If you want to try it out you will need a libraries: - HAML - http://github.com/nex3/haml - table_helper http://github.com/tangofoxtrot/table_helper - will_paginate http://github.com/mislav/will_paginate/ - sexy_flash http://github.com/tangofoxtrot/sexy_flash Also create a new initializer with the following code: class ActiveRecord::Base # Convert the object to a hash_of params for functional tests def to_params(options={}) skip_keys = [:created_at, :updated_at, :id, :deleted_at] self.attributes.symbolize_keys!.delete_if {|k,y| skip_keys.include?(k)}.merge(options) end end And a method in your test_helper for login_as def login_as(user=:joe) @request.session = {:user_id => users(user).id} end Released under the MIT license

