This Gem brings the cool Web App Theme by Andrea Franz to Rails 3 in the form of view generators, plus support for generating Haml-views, when Haml is in use.
Put the following in your Gemfile:
group :development do gem 'web-app-theme-rails' end
Run bundler to install the gem:
bundle install
or do
gem install web-app-theme-rails
Add the following to config/application.rb:
config.generators do |g| g.template_engine "web_app_theme" end
Now you need to generate a app/views/layouts/application.html.erb:
rails generate web_app_theme:layout
See the options on how to choose the theme you want.
BTW: If you are using Haml, a Haml-file is generated and the original application.html.erb will not be replaced and therefore still be the default layout. You need to remove or rename it to make the Haml-file take its place.
Just use rails scaffolding and have a look at the options:
rails generate scaffold Address name:string town:string
In the moment of this writing, generating a controller generates the normal rails views:
rails generate controller Friend index
generates the normal rails view for index.
Haml and Sass support is included. If you have Haml included in your apps Gemfile, web-app-theme-rails produces haml-templates and sass-stylesheets per default.
When you generate a normal controller, the normal rails views are generated in Haml-style instead of ERB-style.
The views and layout were taken from Web App Theme with only very few modifications.
-
Web App Theme: Andrea Franz github.com/pilu/web-app-theme
-
Icons: FAMFAMFAM Silk icons www.famfamfam.com/lab/icons/silk/
Thomas Volkmar Worm, <[email protected]>
-
Fork the project: github.com/tvw/web-app-theme-rails
-
Make your feature addition or bug fix.
-
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
-
Send me a pull request. Bonus points for topic branches.
Copyright © 2010 Thomas Volkmar Worm, Andrea Franz
See LICENSE for details.