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
|
||||
params[:url] = page.url
|
||||
categories = []
|
||||
page.categories.each do |c|
|
||||
category = Category.find(c) rescue nil
|
||||
if !category.nil? && !category.disable
|
||||
categories << c
|
||||
if page.module == "member"
|
||||
page.categories.each do |c|
|
||||
category = Role.find(c) rescue nil
|
||||
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
|
||||
categories = ["all"] if categories.blank?
|
||||
|
|
Loading…
Reference in New Issue