Permalink
Browse files

start of themes support

  • Loading branch information...
1 parent e33817a commit 6a7f3e6691f3939ba78d8a4265f925e39856f4c5 @timothyf committed Mar 5, 2010
View
@@ -9,6 +9,8 @@ require 'rake/rdoctask'
require 'tasks/rails'
+require 'disguise/tasks'
+
test_dir = File.expand_path('test')
Rake::TestTask.new('api_tests') do |t|
View
@@ -23,6 +23,7 @@
# Specify gems that this application depends on.
# They can then be installed with "rake gems:install" on new installations.
+ config.gem 'disguise'
# config.gem "bj"
# config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
# config.gem "aws-s3", :lib => "aws/s3"
@@ -0,0 +1,2 @@
+Disguise::Config.themes_enabled = true
+Disguise::Config.use_domain_for_themes = false
View
@@ -94,6 +94,12 @@
map.resources :forum_topics do |forum_topic|
forum_topic.resources :forum_posts
end
+
+ # admin
+ map.namespace :admin do |a|
+ a.resource :theme
+ a.resources :domain_themes
+ end
# The priority is based upon order of creation: first created -> highest priority.
@@ -0,0 +1,11 @@
+class CreateThemes < ActiveRecord::Migration
+ def self.up
+ create_table :themes, :force => true do |t|
+ t.string :name
+ end
+ end
+
+ def self.down
+ drop_table :themes
+ end
+end
@@ -0,0 +1,13 @@
+class CreateDomainThemes < ActiveRecord::Migration
+ def self.up
+ create_table :domain_themes, :force => true do |t|
+ t.string :uri
+ t.string :name
+ end
+ add_index :domain_themes, ["uri"]
+ end
+
+ def self.down
+ drop_table :domain_themes
+ end
+end
Oops, something went wrong.

0 comments on commit 6a7f3e6

Please sign in to comment.