Project

General

Profile

Actions

Patch #42445

closed

Remove extra condition in User#notify_about?

Added by Nishida Yuya about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Code cleanup/refactoring
Target version:
-

Description

In User#notify_about?, the case of mail_notification.blank? is never. Because User#set_mail_notification (before_create) sets Setting.default_notification_option if blank.

So we can remove its condition. This patch removes it.


  • User#notify_about? source:tags/6.0.4/app/models/user.rb#L818
  • User#set_mail_notification source:tags/6.0.4/app/models/user.rb#L161
    • before_create source:tags/6.0.4/app/models/user.rb#L133

Files

Actions

Also available in: Atom PDF