Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
99ae2c02
Commit
99ae2c02
authored
Jun 09, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explicitly say approve class name in association
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
7ba4e05f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/models/merge_request.rb
app/models/merge_request.rb
+1
-1
app/models/user.rb
app/models/user.rb
+1
-1
spec/factories/approves.rb
spec/factories/approves.rb
+1
-1
No files found.
app/models/merge_request.rb
View file @
99ae2c02
...
...
@@ -35,7 +35,7 @@ class MergeRequest < ActiveRecord::Base
belongs_to
:source_project
,
foreign_key: :source_project_id
,
class_name:
"Project"
has_one
:merge_request_diff
,
dependent: :destroy
has_many
:approves
,
dependent: :destroy
has_many
:approves
,
class_name:
'Approve'
,
dependent: :destroy
after_create
:create_merge_request_diff
after_update
:update_merge_request_diff
...
...
app/models/user.rb
View file @
99ae2c02
...
...
@@ -130,7 +130,7 @@ class User < ActiveRecord::Base
has_many
:assigned_issues
,
dependent: :destroy
,
foreign_key: :assignee_id
,
class_name:
"Issue"
has_many
:assigned_merge_requests
,
dependent: :destroy
,
foreign_key: :assignee_id
,
class_name:
"MergeRequest"
has_many
:oauth_applications
,
class_name:
'Doorkeeper::Application'
,
as: :owner
,
dependent: :destroy
has_many
:approves
,
dependent: :destroy
has_many
:approves
,
class_name:
'Approve'
,
dependent: :destroy
#
...
...
spec/factories/approves.rb
View file @
99ae2c02
# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl
.
define
do
factory
:approve
,
class:
'Approve'
do
factory
:approve
do
merge_request
user
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment