Sha256: 4270a84c394612e2f6c937a5c221cd6b48a55c1f7b2b3f9f1bbf10d71367412c
Contents?: true
Size: 346 Bytes
Versions: 1
Compression:
Stored size: 346 Bytes
Contents
class RailsInfo::System::DirectoriesController < RailsInfoController respond_to :json def index commands = [] commands << "cd #{params[:parent_directory]}" if params[:parent_directory].present? commands << "ls -d */" respond_with IO.popen(commands.join(' && ')).readlines.map{|d| d.strip.gsub('/', '')} end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_info-0.1.1 | app/controllers/rails_info/system/directories_controller.rb |