Skip to content

Instantly share code, notes, and snippets.

@lachie
Forked from pat/gist:76749
Created March 10, 2009 05:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lachie/76753 to your computer and use it in GitHub Desktop.
Save lachie/76753 to your computer and use it in GitHub Desktop.
- filtered_filenames(@items).each do |name|
%p do some stuff
def filtered_filenames(paths)
if paths.nil?
paths = []
end
new_paths = []
for path in paths
filename = File.basename(path)
if !(filename == 'index.haml' || filename[0..5] == 'hide-')
name = filename[0..-6]
new_paths.push(name)
end
end
new_paths
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment