P
Peter Marks
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'}}
if Dir.entries("#{RAILS_ROOT}/documents/") == []
, but none seem to work for me.
(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'}}
if Dir.entries("#{RAILS_ROOT}/documents/") == []
, but none seem to work for me.