Project

General

Profile

« Previous | Next » 

Revision 4f70b15b

Added by Shlomi Zadok over 7 years ago

Fixes #18559 - Order mail notifications by name

(cherry picked from commit 3a10d70170786b8c5583ad95f2e9cb66ffda7ba9)

View differences:

app/controllers/users_controller.rb
def edit
editing_self?
@user = find_resource(:edit_users)
(MailNotification.authorized_as(@user, :view_mail_notifications).subscriptable - @user.mail_notifications).each do |mail_notification|
(MailNotification.authorized_as(@user, :view_mail_notifications).subscriptable - @user.mail_notifications).sort_by(&:name).each do |mail_notification|
@user.user_mail_notifications.build(:mail_notification_id => mail_notification.id)
end
end

Also available in: Unified diff