Change for getting url from key
This commit is contained in:
1 parent
6cfdf0f25a
commit
a03d1ad10b
5 files changed
+8
-7
No files matched your search
@@ -110,7 +110,9 @@ class ApplicationController < ActionController::Base
|
||||
def render_share
|
||||
object_class = params[:model].classify.constantize
|
||||
@object = object_class.find(params[:id])
|
||||
@orig_url = "http://#{params[:orig_host]}/#{params[:orig_path]}"
|
||||
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}"
|
||||
render 'shared/render_share', :layout => false
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user