module DirectoriesHelper

Public Instance Methods

groups_for_directory(directory) click to toggle source
# File app/helpers/directories_helper.rb, line 33
def groups_for_directory(directory)
  directory.groups.map{|group| group.name}.join(', ')
end
groups_for_item(item) click to toggle source
# File app/helpers/directories_helper.rb, line 37
def groups_for_item(item)
  item.groups.map{|group| group.name}.join(', ')
end
path_from_url(path) click to toggle source
# File app/helpers/directories_helper.rb, line 10
def path_from_url(path)
  path.split('/').map{|x| CGI::unescape(x) }.join('/') if path
end
urlsafe_path(path) click to toggle source
# File app/helpers/directories_helper.rb, line 2
def urlsafe_path(path)
  if !path || path == "/"
    '/'
  else
    path.split('/').map{ |x| CGI::escape(x) }.join('/') 
  end
end