Skip to content

Commit

Permalink
Merge pull request #2120 from zz9pzza/issue_4313
Browse files Browse the repository at this point in the history
Issue 4313 clean up remove edit work notification
  • Loading branch information
sarken committed May 31, 2015
2 parents 0bbdff6 + c02dc46 commit 0a5caeb
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 40 deletions.
16 changes: 0 additions & 16 deletions app/mailers/user_mailer.rb
Expand Up @@ -296,22 +296,6 @@ def prompter_notification(work_id, collection_id=nil)
I18n.locale = I18n.default_locale
end

# Sends email to coauthors when a work is edited
# NOTE: this must be sent synchronously! otherwise the new version will be sent.
# TODO refactor to make it asynchronous by passing the content in the method
def edit_work_notification(user, work)
@user = user
@work = work
I18n.with_locale(Locale.find(@user.preference.preferred_locale).iso) do
mail(
to: user.email,
subject: "[#{ArchiveConfig.APP_SHORT_NAME}] Your story has been updated"
)
end
ensure
I18n.locale = I18n.default_locale
end

# Sends email to authors when a creation is deleted
# NOTE: this must be sent synchronously! otherwise the work will no longer be there to send
# TODO refactor to make it asynchronous by passing the content in the method
Expand Down
13 changes: 0 additions & 13 deletions app/models/work_observer.rb
@@ -1,18 +1,5 @@
class WorkObserver < ActiveRecord::Observer

# TODO: Email a copy of the previous version of the work to all co-authors
def before_update(work)
# users = work.pseuds.collect(&:user).uniq
# orphan_account = User.orphan_account
# unless users.blank?
# for user in users
# unless user.preference.edit_emails_off? || user == orphan_account
# UserMailer.edit_work_notification(user, work).deliver!
# end
# end
# end
end

# Email a copy of the deleted work to all co-authors
def before_destroy(work)
if work.posted?
Expand Down
5 changes: 0 additions & 5 deletions app/views/user_mailer/edit_work_notification.html.erb

This file was deleted.

6 changes: 0 additions & 6 deletions app/views/user_mailer/edit_work_notification.text.erb

This file was deleted.

0 comments on commit 0a5caeb

Please sign in to comment.