remove some unused instance variables
This commit is contained in:
parent
cc2664cf09
commit
ee915b62bb
2 changed files with 8 additions and 6 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue