BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
571c832d
Commit
571c832d
authored
May 03, 2017
by
blackst0ne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified assign_attributes for issuable
parent
7ad5a1b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
issuable_base_service.rb
app/services/issuable_base_service.rb
+3
-6
No files found.
app/services/issuable_base_service.rb
View file @
571c832d
...
...
@@ -216,15 +216,12 @@ class IssuableBaseService < BaseService
params
[
:label_ids
]
=
label_ids
if
labels_changing?
(
issuable
.
label_ids
,
label_ids
)
if
issuable
.
changed?
||
params
.
present?
issuable
.
assign_attributes
(
params
.
merge
(
updated_by:
current_user
))
if
has_title_or_description_changed?
(
issuable
)
issuable
.
assign_attributes
(
params
.
merge
(
last_edited_at:
Time
.
now
,
last_edited_by:
current_user
))
issuable
.
assign_attributes
(
last_edited_at:
Time
.
now
,
last_edited_by:
current_user
)
end
issuable
.
assign_attributes
(
params
.
merge
(
updated_by:
current_user
))
before_update
(
issuable
)
if
issuable
.
with_transaction_returning_status
{
issuable
.
save
}
...
...
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