Fix bug in show_from_link
This commit is contained in:
parent
46177000e0
commit
3432d1359b
|
@ -47,8 +47,9 @@ class PagesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def show_from_link
|
def show_from_link
|
||||||
url = "/#{@item.path}?id=#{params[:id]}"
|
url = "/#{@item.path}"
|
||||||
options = ''
|
options = ''
|
||||||
|
options << "#{options.blank? ? '?' : '&'}id=#{params[:id]}" unless params[:id].blank?
|
||||||
options << "#{options.blank? ? '?' : '&'}category_id=#{params[:category_id]}" unless params[:category_id].blank?
|
options << "#{options.blank? ? '?' : '&'}category_id=#{params[:category_id]}" unless params[:category_id].blank?
|
||||||
options << "#{options.blank? ? '?' : '&'}tag_id=#{params[:tag_id]}" unless params[:tag_id].blank?
|
options << "#{options.blank? ? '?' : '&'}tag_id=#{params[:tag_id]}" unless params[:tag_id].blank?
|
||||||
options << "#{options.blank? ? '?' : '&'}preview=#{params[:preview]}" unless params[:preview].blank?
|
options << "#{options.blank? ? '?' : '&'}preview=#{params[:preview]}" unless params[:preview].blank?
|
||||||
|
|
Reference in New Issue