forked from saurabh/orbit4-5
fixed member categories all problem
This commit is contained in:
parent
e21ad257ff
commit
2402f953f0
|
@ -75,10 +75,19 @@ class PagesController < ApplicationController
|
||||||
end
|
end
|
||||||
params[:url] = page.url
|
params[:url] = page.url
|
||||||
categories = []
|
categories = []
|
||||||
page.categories.each do |c|
|
if page.module == "member"
|
||||||
category = Category.find(c) rescue nil
|
page.categories.each do |c|
|
||||||
if !category.nil? && !category.disable
|
category = Role.find(c) rescue nil
|
||||||
categories << c
|
if !category.nil? && !category.disabled
|
||||||
|
categories << c
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
page.categories.each do |c|
|
||||||
|
category = Category.find(c) rescue nil
|
||||||
|
if !category.nil? && !category.disable
|
||||||
|
categories << c
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
categories = ["all"] if categories.blank?
|
categories = ["all"] if categories.blank?
|
||||||
|
|
Loading…
Reference in New Issue