now i'm importing this directory
Dir["#{Rails.root}/app/{views,controllers}/**/**/**/**"]
but i want to exclude one directory in a specified position
Dir["#{Rails.root}/app/{views,controllers}/#All dir开发者_运维技巧ectory but exclude 'admin'#/**/**/**"]
any help?
try
Dir["#{Rails.root}/app/{views,controllers}/**/**/**/**"].reject { |f| f["#{Rails.root}/app/{views,controllers}/admin/"]}
精彩评论