Themes

Added themes to my application, using theme generator .

wget http://darthapo.com/repos/theme_generator-1.0.2.gem
gem install theme_generator-1.0.2.gem
cd myapp
./script/generate theme default

Include at the bottom of myapp/config/environment.rb :

require_dependency 'theme_engine'

In the controllers:

class MyController << ApplicationController
  layout :themed_layout
	
  def current_theme
    'default'
  end
end

To set the theme for the entire application, use myapp/controllers/application.rb

In the views:

<img src=\"<%= theme_image_path 'my-image.png' %>\" />

Have also theme_stylesheet_path, theme_javascript_path etc. helper methods.