summaryrefslogtreecommitdiff
path: root/config/initializers/relative_naming_ci_namespace.rb
blob: 03ac55be0b694d7f75aecbe97492682870ef649e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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:
# - namespace_project_job_path(project.namespace, project, build)
#
# Without that, Ci:: namespace is used for resolving routes:
# - namespace_project_ci_build_path(project.namespace, project, build)

module Ci
  def self.use_relative_model_naming?
    true
  end
end