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 params[:url] = page.url
categories = [] categories = []
if page.module == "member" if page.module == "member"
page.categories.each do |c| if page.categories.first == "all"
category = Role.find(c) rescue nil categories = ["all"]
if !category.nil? && !category.disabled else
categories << c page.categories.each do |c|
category = Role.find(c) rescue nil
if !category.nil? && !category.disabled
categories << c
end
end end
end end
else else