Sha256: 59d0a65430bf988fe6d8879d43b00eecc1385f4200d8c705606dccd297054754
Contents?: true
Size: 594 Bytes
Versions: 1
Compression:
Stored size: 594 Bytes
Contents
require 'rscm/directories' class FilesController < ApplicationController def list load_project root = @project.checkout_dir relative_path = @params['path'] absolute_path = relative_path ? "#{root}/#{relative_path}" : root if(File.file?(absolute_path)) # TODO: use http://rubyforge.org/projects/syntax/ # TODO: the file contents should be rendered within the regular layout render_text(File.open(absolute_path).read) else @relative_paths = Dir["#{absolute_path}/*"].collect {|f| f[root.length+1..-1]} end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
damagecontrol-0.5.0 | app/controllers/files_controller.rb |