Fix fb share, redirect with js when the page is not requested by fb but by user

This commit is contained in:
Christophe Vilayphiou committed 2012-08-08 11:04:19 +08:00
1 parent a03d1ad10b
commit 05e61b63bb
3 files changed
+8 -4

No files matched your search

+1 -1
View File
@@ -112,7 +112,7 @@ class ApplicationController < ActionController::Base
@object = object_class.find(params[:id])
module_app = ModuleApp.first(:conditions => {:key => params[:key]})
@item = Item.where(module_app_id: module_app.id).all_of("tag" => {"$in" => [nil,'']},"category" => { "$in" => [nil,'']}).first
@orig_url = "http://#{request.host}/#{@item.path}?id=#{@object.id}"
@orig_url = "http://#{request.host_with_port}/#{@item.path}?id=#{@object.id}"
render 'shared/render_share', :layout => false
end