Ruby on Rails
HowtoUseThemedViews

There are multiple ways to implement a themeable Ruby on Rails application.

The Plugin Way

Use MattMcCray’s Theme Support Plugin. For more Information see the “Theme Generator” in AvailableGenerators.

The “quick and dirty” way

Alternatively you can just change the folder where views are loaded from. This is a way simpler approach and might be sufficient in most cases.

class ApplicationController < ActionController::Base
  before_filter :choose_theme
  
  private
  def choose_theme
    ActionController::Base.template_root = File.join(RAILS_ROOT, 'app/views', @params['theme'])
  end
end

Seen on http://www.bigbold.com/snippets/posts/show/218