diff options
author | Semyon Pupkov <mail@semyonpupkov.com> | 2017-01-15 12:08:29 +0500 |
---|---|---|
committer | Semyon Pupkov <mail@semyonpupkov.com> | 2017-01-15 12:08:29 +0500 |
commit | de460f7e4d06bec7bd6138c2b4edc956e9df4471 (patch) | |
tree | a647987e1193ef32b7b207f4cb8fd6153e330368 /app | |
parent | 28f633a96a4b16f680dc345aa87fa7aa21c53481 (diff) | |
download | gitlab-ce-de460f7e4d06bec7bd6138c2b4edc956e9df4471.tar.gz |
Use string for class_name option for lazy autoload class
Passing constant into this option is deprecated in Rails 5.2
https://github.com/rails/rails/commit/8312a0d22212798864f142b5a94805e0baa6c562
Diffstat (limited to 'app')
-rw-r--r-- | app/models/forked_project_link.rb | 4 | ||||
-rw-r--r-- | app/models/project.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/models/forked_project_link.rb b/app/models/forked_project_link.rb index 9803bae0bee..36cf7ad6a28 100644 --- a/app/models/forked_project_link.rb +++ b/app/models/forked_project_link.rb @@ -1,4 +1,4 @@ class ForkedProjectLink < ActiveRecord::Base - belongs_to :forked_to_project, class_name: Project - belongs_to :forked_from_project, class_name: Project + belongs_to :forked_to_project, class_name: 'Project' + belongs_to :forked_from_project, class_name: 'Project' end diff --git a/app/models/project.rb b/app/models/project.rb index c22386c84e9..e85d3d3bc6c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -122,7 +122,7 @@ class Project < ActiveRecord::Base # Merge Requests for target project should be removed with it has_many :merge_requests, dependent: :destroy, foreign_key: 'target_project_id' # Merge requests from source project should be kept when source project was removed - has_many :fork_merge_requests, foreign_key: 'source_project_id', class_name: MergeRequest + has_many :fork_merge_requests, foreign_key: 'source_project_id', class_name: 'MergeRequest' has_many :issues, dependent: :destroy has_many :labels, dependent: :destroy, class_name: 'ProjectLabel' has_many :services, dependent: :destroy |