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 protected
def download_purchase(purchase, url) 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) http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri) request = Net::HTTP::Post.new(uri.request_uri)

View File

@ -1,7 +1,7 @@
<% if @site && @site.registered? %> <% if @site && @site.registered? %>
registered registered
<% else %> <% 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, {:site => {:school => @site.school, :department => @site.department}}.to_query,
:target => '_blank' %> :target => '_blank' %>
<% end %> <% end %>

View File

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