almost fixed the regression of not allowing top level filters

This commit is contained in:
Sam
2013-05-23 16:38:29 +10:00
parent 84fd366322
commit fc3c93d237
3 changed files with 7 additions and 5 deletions

View File

@ -216,11 +216,13 @@ class SiteSetting < ActiveRecord::Base
end
def self.homepage
top_menu.split('|')[0]
# TODO objectify this
x = top_menu.split('|')[0].split(',')[0]
end
def self.anonymous_homepage
top_menu.split('|').select{ |f| ['latest', 'hot', 'categories', 'category'].include? f }[0]
# TODO objectify this
top_menu.split('|').map{|f| f.split(',')[0] }.select{ |f| ['latest', 'hot', 'categories', 'category'].include? f}[0]
end
end