minor fix for emailers and facebook

This commit is contained in:
Harry Bomrah 2013-11-29 19:35:39 +08:00 committed by saurabhbhatia
parent 685f696536
commit 8c4d6b972a
3 changed files with 4 additions and 4 deletions

View File

@ -59,7 +59,7 @@ class FacebookController< ApplicationController
data = JSON.parse(friends)
if data["success"]
user = JSON.parse(data["user"])
u = User.find(current_user.id)
u = User.find(temp_user.id)
firstname = {}
lastname = {}
@site_valid_locales.each do |locale|
@ -87,7 +87,7 @@ class FacebookController< ApplicationController
end
def server_redirect
@url = "#{@@facebook_server}/login?callback=#{request.protocol}#{request.host_with_port}/facebook/register_fb?user="+current_user.id.to_s rescue nil
@url = "#{@@facebook_server}/login?callback=#{request.protocol}#{request.host_with_port}/facebook/register_fb?user="+params[:user_id] rescue nil
if !@url.nil?
redirect_to @url
else

View File

@ -23,7 +23,7 @@
var facebookWindow = null,
timeInterval = null;
$("a.facebook").click(function(){
facebookWindow = window.open('<%= facebook_server_path %>','login_window','height=668,width=1124,titlebar=0,statusbar=0,location=0');
facebookWindow = window.open('<%= facebook_server_path(:user_id=>@user.id.to_s) %>','login_window','height=668,width=1124,titlebar=0,statusbar=0,location=0');
clearInterval(timeInterval);
timeInterval = setInterval(function(){
if( facebookWindow.closed ){

View File

@ -25,7 +25,7 @@ Orbit::Application.configure do
# config.cache_store = :mem_cache_store
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.default_url_options = { :host => 'harry.tp.rulingcom.com' }
config.assets.debug = false