fix for all members

This commit is contained in:
Harry Bomrah 2014-12-19 17:53:24 +08:00
parent fc184a7cea
commit e3e15a1ef2
1 changed files with 8 additions and 4 deletions

View File

@ -76,10 +76,14 @@ class PagesController < ApplicationController
params[:url] = page.url
categories = []
if page.module == "member"
page.categories.each do |c|
category = Role.find(c) rescue nil
if !category.nil? && !category.disabled
categories << c
if page.categories.first == "all"
categories = ["all"]
else
page.categories.each do |c|
category = Role.find(c) rescue nil
if !category.nil? && !category.disabled
categories << c
end
end
end
else