Skip to content

Commit

Permalink
Added nifty config generator
Browse files Browse the repository at this point in the history
  • Loading branch information
anathematic committed Feb 7, 2010
1 parent c6ece52 commit 20d56ac
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/layouts/admin.html.erb
Expand Up @@ -5,7 +5,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<title>untitled</title>
<title><%= APP_CONFIG[:name] %> - Admin</title>
<%= stylesheet_link_tag "formtastic.css", "admin.css" %>
</head>

Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Expand Up @@ -5,7 +5,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<title>untitled</title>
<title><%= APP_CONFIG[:name] %></title>

</head>

Expand Down
15 changes: 15 additions & 0 deletions config/app_config.yml
@@ -0,0 +1,15 @@
development:
domain: localhost:3000
name: Ball Shop

cucumber:
domain: test.host
name: Ball Shop

test:
domain: test.host
name: Ball Shop

production:
domain: example.com
name: Ball Shop
2 changes: 2 additions & 0 deletions config/initializers/load_app_config.rb
@@ -0,0 +1,2 @@
raw_config = File.read(RAILS_ROOT + "/config/app_config.yml")
APP_CONFIG = YAML.load(raw_config)[RAILS_ENV].symbolize_keys

0 comments on commit 20d56ac

Please sign in to comment.