Sha256: ce8965c97cb687019a5c3bbbcc12fe329abe30e0a0f1bc1f922fe775e9c92345

Contents?: true

Size: 1.35 KB

Versions: 20

Compression:

Stored size: 1.35 KB

Contents

## Rails 3 Generators for Mustache

[Mustache](http://github.com/defunkt/mustache) support for [Rails 3](http://weblog.rubyonrails.org/2010/6/8/rails-3-0-beta-4-now-rc-in-days) is [still developing](http://github.com/defunkt/mustache/issues/#issue/3). Following the work of others, I have built a provisional template handler that is included with these generators. To install it in your project, `rails g mustache:install`

I'm assuming that the Mustache template engine that gets the official blessing will expect to find files where Chris W. and others have suggested the files should go, so I have built my generators and provisional template handler accordingly. I.e. the files for widget views go in:

* app/views/widgets/action.rb for view class definitions
* app/templates/widgets/action.html.mustache for templates


### To Do

* Enable mustache layout usage (uses default application.erb for now)
* Add controller-retrofit generator to build default mustache views for existing controllers
* Generate different fields for different attribute types
* Helper generation for leaner view files

### Thanks

* Louis T. for running the umbrella Rails 3 Generators project and giving me pointers on writing generators. 
* Paul Barry for invaluable help figuring out how Rails template handlers work.
* José Valim, Paul Barry, and Jeremy McAnally for good information.

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rails3-generators-1.0.0 lib/generators/mustache/README.md
rails3-generators-0.17.6 lib/generators/mustache/README.md
rails3-generators-0.17.5 lib/generators/mustache/README.md
rails3-generators-0.17.4 lib/generators/mustache/README.md
rails3-generators-0.17.3 lib/generators/mustache/README.md
rails3-generators-0.17.2 lib/generators/mustache/README.md
rails3-generators-0.17.1 lib/generators/mustache/README.md
rails3-generators-0.17.0 lib/generators/mustache/README.md
rails3-generators-0.16.1 lib/generators/mustache/README.md
rails3-generators-0.16.0 lib/generators/mustache/README.md
rails3-generators-0.15.0 lib/generators/mustache/README.md
rails3-generators-0.14.0 lib/generators/mustache/README.md
rails3-generators-0.13.0 lib/generators/mustache/README.md
rails3-generators-0.12.1 lib/generators/mustache/README.md
rails3-generators-0.12.0 lib/generators/mustache/README.md
rails3-generators-0.11.0 lib/generators/mustache/README.md
rails3-generators-0.10.3 lib/generators/mustache/README.md
rails3-generators-0.10.2 lib/generators/mustache/README.md
rails3-generators-0.10.1 lib/generators/mustache/README.md
rails3-generators-0.10.0 lib/generators/mustache/README.md