]> source.dussan.org Git - redmine.git/commitdiff
avoid multi-line ternary operators in app/helpers/settings_helper.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 4 Jul 2020 12:14:19 +0000 (12:14 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 4 Jul 2020 12:14:19 +0000 (12:14 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19855 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/settings_helper.rb

index fad1698ea6035bc096454a5636953fd8c59d2862..d615235b780cb02761ed996e2d8f17f67375984b 100644 (file)
@@ -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),