Fix fb share, redirect with js when the page is not requested by fb but by user
This commit is contained in:
1 parent
a03d1ad10b
commit
05e61b63bb
3 files changed
+8
-4
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user