I see this question was asked a while back
(http://www.ruby-forum.com/topic/84762), but I'm having trouble
implementing any of the solutions. I have tried:
if Dir["#{RAILS_ROOT}/documents/"].empty?
if catch('empty'){Dir.glob("#{RAILS_ROOT}/documents/"){throw 'empty'}}
I see this question was asked a while back
(http://www.ruby-forum.com/topic/84762\), but I'm having trouble
implementing any of the solutions. I have tried:
if Dir["#{RAILS_ROOT}/documents/"].empty?
You need the star here as well - as you probably know by now.
if catch('empty'){Dir.glob("#{RAILS_ROOT}/documents/"){throw 'empty'}}