Set store_ip in config.yml

This commit is contained in:
chris2tof 2011-08-22 14:01:51 +08:00
parent 7a4ad240a8
commit 2cdb5a756d
3 changed files with 3 additions and 2 deletions

View File

@ -20,7 +20,7 @@ class Admin::PurchasesController < ApplicationController
protected
def download_purchase(purchase, url)
uri = URI.parse("http://localhost:3001/download/design")
uri = URI.parse("http://#{APP_CONFIG['store_ip']}/download/design")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri)

View File

@ -1,7 +1,7 @@
<% if @site && @site.registered? %>
registered
<% else %>
<%= link_to 'register', 'http://localhost:3001/user/sites/register?' +
<%= link_to 'register', "http://#{APP_CONFIG['store_ip']}/user/sites/register?" +
{:site => {:school => @site.school, :department => @site.department}}.to_query,
:target => '_blank' %>
<% end %>

View File

@ -1,5 +1,6 @@
defaults: &defaults
main_public_key: 'lib/main_public_key.pem'
store_ip: 'localhost:3001'
development:
<<: *defaults