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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
f17fe7ff
Commit
f17fe7ff
authored
Feb 25, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct indentation in activity observer
parent
7bab81b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
app/observers/activity_observer.rb
app/observers/activity_observer.rb
+14
-14
app/observers/note_observer.rb
app/observers/note_observer.rb
+0
-1
No files found.
app/observers/activity_observer.rb
View file @
f17fe7ff
...
...
@@ -21,22 +21,22 @@ class ActivityObserver < ActiveRecord::Observer
end
def
after_close
(
record
,
transition
)
Event
.
create
(
project:
record
.
project
,
target_id:
record
.
id
,
target_type:
record
.
class
.
name
,
action:
Event
::
CLOSED
,
author_id:
record
.
author_id_of_changes
)
Event
.
create
(
project:
record
.
project
,
target_id:
record
.
id
,
target_type:
record
.
class
.
name
,
action:
Event
::
CLOSED
,
author_id:
record
.
author_id_of_changes
)
end
def
after_reopen
(
record
,
transition
)
Event
.
create
(
project:
record
.
project
,
target_id:
record
.
id
,
target_type:
record
.
class
.
name
,
action:
Event
::
REOPENED
,
author_id:
record
.
author_id_of_changes
)
Event
.
create
(
project:
record
.
project
,
target_id:
record
.
id
,
target_type:
record
.
class
.
name
,
action:
Event
::
REOPENED
,
author_id:
record
.
author_id_of_changes
)
end
end
app/observers/note_observer.rb
View file @
f17fe7ff
class
NoteObserver
<
ActiveRecord
::
Observer
def
after_create
(
note
)
send_notify_mails
(
note
)
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