app/helpers/default_path_helper.rb
# Find the workbench associated to the given resource
Find the workbench associated to the given resource
Find the workbench associated to the given resource
def resource_workbench
      return unless resource
      provider = resource.try(:line_provider) || resource.try(:stop_area_provider) || resource.try(:shape_provider)
      return unless provider
      candidate_workbench_id = provider.workbench_id
      candidate_workbenches.find_by id: candidate_workbench_id
    end
def resource_workbench return unless resource provider = resource . try ( :line_provider ) || resource . try ( :stop_area_provider ) || resource . try ( :shape_provider ) return unless provider candidate_workbench_id = provider . workbench_id candidate_workbenches . find_by id : candidate_workbench_id end
Find the workbench associated to the given resource
Find the workbench associated to the given resource