Module: ApplicationHelper
- Defined in:
- app/helpers/application_helper.rb
Overview
Global helper functions
Instance Method Summary (collapse)
-
- (String) input_path(run)
Absolute path to an input .zip.
-
- (String) output_path(run, eadid = nil)
Absolute path to an output XML or .zip.
-
- (Object) pp_time(time)
Generic print function for date-times in tool.
Instance Method Details
- (String) input_path(run)
Returns absolute path to an input .zip
17 18 19 |
# File 'app/helpers/application_helper.rb', line 17 def input_path(run) "/input/#{run.id.to_s}/input.zip" end |
- (String) output_path(run, eadid = nil)
Returns absolute path to an output XML or .zip
11 12 13 |
# File 'app/helpers/application_helper.rb', line 11 def output_path(run, eadid = nil) "/output/#{run.id.to_s}/#{eadid ? "#{eadid}.xml" : 'out.zip'}" end |
- (Object) pp_time(time)
Generic print function for date-times in tool
4 5 6 |
# File 'app/helpers/application_helper.rb', line 4 def pp_time(time) time.strftime Rails.configuration.x.time_display_fmt end |