Permalink
Browse files

Parent domain now defined in config.yml

  • Loading branch information...
nmanzi committed Oct 9, 2011
1 parent 26c9bd7 commit fb233980fcab791764df628b6a1ea2863a62771a
View
@@ -21,14 +21,17 @@ Config.yml
----------
development:
+ parent_domain: <parent domain>
username: <username>
password: <password>
test:
+ parent_domain: <parent domain>
username: <username>
password: <password>
production:
+ parent_domain: <parent domain>
username: <username>
password: <password>
@@ -15,7 +15,7 @@
<div class="input">
<%= hidden_field_tag "default_subdomain", @default_subdomain %>
<%= f.text_field :subdomain, :placeholder => @default_subdomain, :value => (@link.subdomain unless @link.subdomain == @default_subdomain) %>
- <span class="help-inline">Enter without the parent domain, e.g. subbysub NOT subbysub.hadric.us</span>
+ <span class="help-inline">Enter without the parent domain, e.g. subbysub NOT subbysub.<%= APP_CONFIG['parent_domain'] %></span>
<% @link.errors[:subdomain].each do |msg| %>
<span class="help-block"><%= msg.capitalize %>!</span>
<% end %>
@@ -1,6 +1,6 @@
<%= render :partial => 'errors' %>
-<div class="page-header"><h1>Editing Subdomain <small><%= @link.subdomain %>.hadric.us</small></h1></div>
+<div class="page-header"><h1>Editing Subdomain <small><%= "#{@link.subdomain}.#{APP_CONFIG['parent_domain']}" %></small></h1></div>
<%= render 'form' %>
@@ -12,7 +12,7 @@
<% @links.each do |link| %>
<tr>
- <td><%= link.subdomain %><span class="sublabel">.hadric.us</span></td>
+ <td><%= link.subdomain %><span class="sublabel">.<%= APP_CONFIG['parent_domain'] %></span></td>
<td><a href="<%= link.url %>"><%= link.url %></a></td>
<% if is_authed? %>
<td><%= link.visits %></td>
@@ -25,7 +25,7 @@
<h3>Are you sure?</h3>
</div>
<div class="modal-body">
- <p>Really destroy subdomain <strong><%= link.subdomain %>.hadric.us</strong>?</p>
+ <p>Really destroy subdomain <strong><%= "#{link.subdomain}.#{APP_CONFIG['parent_domain']}" %></strong>?</p>
</div>
<div class="modal-footer">
<%= link_to 'Destroy', link, method: :delete, :class => "btn danger" %>
@@ -1,5 +1,5 @@
<%= render :partial => 'errors' %>
-<div class="page-header"><h1>New Subdomain <small>@ hadric.us</small></h1></div>
+<div class="page-header"><h1>New Subdomain <small>@ <%= APP_CONFIG['parent_domain'] %></small></h1></div>
<%= render 'form' %>

0 comments on commit fb23398

Please sign in to comment.