tangofoxtrot / haml_scaffold forked from cnaths/haml_scaffold

Core rails scaffolding with haml replacements for the views

This URL has Read+Write access

Richard Luther (author)
Wed Oct 07 22:23:44 -0700 2009
name age message
file MIT-LICENSE Thu Sep 11 16:48:19 -0700 2008 basics implemented [Christian Naths]
file README Loading commit data...
file Rakefile Thu Sep 11 16:48:19 -0700 2008 basics implemented [Christian Naths]
directory generators/
file init.rb Thu Sep 11 16:48:19 -0700 2008 basics implemented [Christian Naths]
file install.rb Thu Sep 11 16:48:19 -0700 2008 basics implemented [Christian Naths]
directory tasks/ Thu Sep 11 16:48:19 -0700 2008 basics implemented [Christian Naths]
directory test/ Thu Sep 11 16:48:19 -0700 2008 basics implemented [Christian Naths]
file uninstall.rb Thu Sep 11 16:48:19 -0700 2008 basics implemented [Christian Naths]
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