1# frozen_string_literal: true 2 3module IidRoutes 4 ## 5 # This automagically enforces all related routes to use `iid` instead of `id` 6 # If you want to use `iid` for some routes and `id` for other routes, this module should not to be included, 7 # instead you should define `iid` or `id` explicitly at each route generators. e.g. pipeline_path(project.id, pipeline.iid) 8 def to_param 9 iid.to_s 10 end 11end 12