From a425be37b8410248d10e4f79dc39e1fb1b70c693 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 4 Jul 2020 12:14:19 +0000 Subject: [PATCH] avoid multi-line ternary operators in app/helpers/settings_helper.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19855 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/settings_helper.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index fad1698ea..d615235b7 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -110,9 +110,12 @@ module SettingsHelper # Renders a notification field for a Redmine::Notifiable option def notification_field(notifiable) - tag_data = notifiable.parent.present? ? - {:parent_notifiable => notifiable.parent} : - {:disables => "input[data-parent-notifiable=#{notifiable.name}]"} + tag_data = + if notifiable.parent.present? + {:parent_notifiable => notifiable.parent} + else + {:disables => "input[data-parent-notifiable=#{notifiable.name}]"} + end tag = check_box_tag('settings[notified_events][]', notifiable.name, setting_value('notified_events').include?(notifiable.name), -- 2.39.5