Welcome to mirror list, hosted at ThFree Co, Russian Federation.

iid_routes.rb « concerns « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3eeb29b65955359605028ef2739b1b744a645c20 (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

module IidRoutes
  ##
  # This automagically enforces all related routes to use `iid` instead of `id`
  # If you want to use `iid` for some routes and `id` for other routes, this module should not to be included,
  # instead you should define `iid` or `id` explicitly at each route generators. e.g. pipeline_path(project.id, pipeline.iid)
  def to_param
    iid.to_s
  end
end