From 38737079b6c1096c2517e249198b8bc0bedf4156 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 9 Feb 2013 15:26:47 +0200 Subject: ignore docs by git --- doc/code/classes/NoteObserver.html | 290 ------------------------------------- 1 file changed, 290 deletions(-) delete mode 100644 doc/code/classes/NoteObserver.html (limited to 'doc/code/classes/NoteObserver.html') diff --git a/doc/code/classes/NoteObserver.html b/doc/code/classes/NoteObserver.html deleted file mode 100644 index cc0e5156c44..00000000000 --- a/doc/code/classes/NoteObserver.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - NoteObserver - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - -
Methods
-
- -
A
-
- -
- -
N
-
- -
- -
S
-
- -
- -
T
-
- -
- -
- - - - - - - - - - - - - - - - - - - - -
Instance Public methods
- -
-
- - after_create(note) - - -
- - -
- -
- - - - - - -
- - -
-
# File app/observers/note_observer.rb, line 3
-def after_create(note)
-  send_notify_mails(note)
-end
-
-
- -
- -
Instance Protected methods
- -
-
- - notify_team(note) - - -
- - -
-

Notifies the whole team except the author of note

-
- - - - - - -
- - -
-
# File app/observers/note_observer.rb, line 22
-def notify_team(note)
-  # Note: wall posts are not "attached" to anything, so fall back to "Wall"
-  noteable_type = note.noteable_type.presence || "Wall"
-  notify_method = "note_#{noteable_type.underscore}_email".to_sym
-
-  if Notify.respond_to? notify_method
-    team_without_note_author(note).map do |u|
-      Notify.send(notify_method, u.id, note.id).deliver
-    end
-  end
-end
-
-
- -
- -
-
- - send_notify_mails(note) - - -
- - -
- -
- - - - - - -
- - -
-
# File app/observers/note_observer.rb, line 9
-def send_notify_mails(note)
-  if note.notify
-    notify_team(note)
-  elsif note.notify_author
-    # Notify only author of resource
-    Notify.note_commit_email(note.commit_author.id, note.id).deliver
-  else
-    # Otherwise ignore it
-    nil
-  end
-end
-
-
- -
- -
-
- - team_without_note_author(note) - - -
- - -
- -
- - - - - - -
- - -
-
# File app/observers/note_observer.rb, line 34
-def team_without_note_author(note)
-  note.project.users.reject { |u| u.id == note.author.id }
-end
-
-
- -
-
- -
- - \ No newline at end of file -- cgit v1.2.1