tags:

views:

19

answers:

0

I have an application that calls an other application that populates a directory. Once it is finished I want to provide a link to the directory that contains the created files and people can examine or download them via the browser:

For example this works to provide a link to a single file: (Note this uses HAML) but the idea is the same

%p - output_href = File.join("..","..","test_runs",File.basename(@dealclick_test_run.result_filename) ) Result file = %a{:id => "result-file", :href => "#{output_href}"} = File.basename(@dealclick_test_run.result_filename)

The corresponding code for the directory doesn't work:

  %p
Results:
- output_href = File.join("..","..","test_runs",File.basename(@dp_test_run.result_filename) )
%a( id = "dealprocessor_results" href = "#{output_href}" )
  = File.basename(@dp_test_run.result_filename)

What am I doing wrong?