Permalink
Browse files

settingslogicプラグインを追加。

  • Loading branch information...
fakestarbaby committed May 24, 2011
1 parent 8fa9bba commit b416a72b57f0bfea54b8559fe290d9dcc697562b
View
@@ -4,4 +4,5 @@ gem 'rails', '3.0.7'
gem 'heroku'
gem 'jquery-rails'
+gem 'settingslogic'
gem 'sqlite3-ruby', :require => 'sqlite3'
View
@@ -72,6 +72,7 @@ GEM
rake (0.9.0)
rest-client (1.6.1)
mime-types (>= 1.16)
+ settingslogic (2.0.6)
sqlite3 (1.3.3)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
@@ -88,4 +89,5 @@ DEPENDENCIES
heroku
jquery-rails
rails (= 3.0.7)
+ settingslogic
sqlite3-ruby
@@ -1,5 +1,5 @@
class WelcomeController < ApplicationController
def index
- @page_title = 'everything'
+ @page_title = Settings.page.title.welcome.index
end
end
View
@@ -0,0 +1,4 @@
+class Settings < Settingslogic
+ source "#{Rails.root}/config/initializers/settings.yml"
+ namespace Rails.env
+end
@@ -1 +1 @@
-<p id="copyright"><small>&#169; <%= Date.today.year %> @fakestarbaby</small></p>
+<p id="copyright"><small>&#169; <%= Date.today.year %> <%= Settings.page.copyright %></small></p>
@@ -0,0 +1,15 @@
+defaults: &defaults
+ page:
+ title:
+ welcome:
+ index: everything
+ copyright: @fakestarbaby
+
+development:
+ <<: *defaults
+
+test:
+ <<: *defaults
+
+production:
+ <<: *defaults

0 comments on commit b416a72

Please sign in to comment.