remove some unused instance variables

This commit is contained in:
tdreyno 2009-08-11 11:21:49 -07:00
parent cc2664cf09
commit ee915b62bb
2 changed files with 8 additions and 6 deletions

View file

@ -5,8 +5,12 @@ def link_to(title, url="#", params={})
end
def page_classes(*additional)
path = env["REQUEST_PATH"]
path << "index.html" if path.match(%r{/$})
path.gsub!(%r{^/}, '')
classes = []
parts = @full_request_path.split('.')[0].split('/')
parts = path.split('.')[0].split('/')
parts.each_with_index { |path, i| classes << parts.first(i+1).join('_') }
classes << "index" if classes.empty?