2021-02-03 16:09:17 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-07-16 19:48:51 -04:00
|
|
|
# Description: https://coderwall.com/p/heed_q/rails-routing-and-namespaced-models
|
|
|
|
#
|
|
|
|
# This allows us to use CI ActiveRecord objects in all routes and use it:
|
|
|
|
# - [project.namespace, project, build]
|
|
|
|
#
|
|
|
|
# instead of:
|
2017-06-29 13:06:35 -04:00
|
|
|
# - project_job_path(project, build)
|
2016-07-16 19:48:51 -04:00
|
|
|
#
|
|
|
|
# Without that, Ci:: namespace is used for resolving routes:
|
2017-06-29 13:06:35 -04:00
|
|
|
# - project_ci_build_path(project, build)
|
2016-07-16 19:48:51 -04:00
|
|
|
|
|
|
|
module Ci
|
|
|
|
def self.use_relative_model_naming?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|