新建news报500
This commit is contained in:
parent
b23892e29e
commit
3ea33aa847
|
@ -20,7 +20,7 @@ class Forum < ActiveRecord::Base
|
|||
after_destroy :delete_kindeditor_assets
|
||||
acts_as_taggable
|
||||
scope :by_join_date, order("created_at DESC")
|
||||
after_create :send_email
|
||||
after_create :send_mail
|
||||
def reset_counters!
|
||||
self.class.reset_counters!(id)
|
||||
end
|
||||
|
@ -35,7 +35,8 @@ class Forum < ActiveRecord::Base
|
|||
self.creator == user || user.admin?
|
||||
end
|
||||
|
||||
def send_email
|
||||
def send_mail
|
||||
logger.debug "send mail for forum add."
|
||||
Mailer.run.forum_add(self) if Setting.notified_events.include?('forum_add')
|
||||
end
|
||||
# Updates topic_count, memo_count and last_memo_id attributes for +board_id+
|
||||
|
|
|
@ -103,7 +103,7 @@ class News < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def send_mail
|
||||
Mailer.run.news_added(news) if Setting.notified_events.include?('news_added')
|
||||
Mailer.run.news_added(self) if Setting.notified_events.include?('news_added')
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue