Sha256: c250a94fdadf91ff644bd82d9257b0ab7d59a34ab49b66d0faae2d386c282e79

Contents?: true

Size: 473 Bytes

Versions: 4

Compression:

Stored size: 473 Bytes

Contents

module MystroVolley
  module ApplicationHelper
    def path_helper(o)
      case o.class
        when MystroVolley::Project then root_path + "#{o.name}"
        when MystroVolley::Branch then root_path + "#{o.project.name}/#{o.name}"
        when MystroVolley::Version then root_path + "#{o.project.name}/#{o.branch.name}/#{o.name}"
        else root_path
      end
    rescue => e
      flash.now[:error] = "could not find path for #{o}"
      root_path
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mystro-volley-0.1.0 app/helpers/mystro_volley/application_helper.rb
mystro-volley-0.1.0.rc3 app/helpers/mystro_volley/application_helper.rb
mystro-volley-0.1.0.rc2 app/helpers/mystro_volley/application_helper.rb
mystro-volley-0.1.0.rc1 app/helpers/mystro_volley/application_helper.rb