diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-07-04 12:14:19 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-07-04 12:14:19 +0000 |
commit | a425be37b8410248d10e4f79dc39e1fb1b70c693 (patch) | |
tree | d9a13e6f91ad69ca3ccf349b986208fa34c70299 /app/helpers/settings_helper.rb | |
parent | 0b138f1c4e2466c6371010697572f8155cd0e3da (diff) | |
download | redmine-a425be37b8410248d10e4f79dc39e1fb1b70c693.tar.gz redmine-a425be37b8410248d10e4f79dc39e1fb1b70c693.zip |
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
Diffstat (limited to 'app/helpers/settings_helper.rb')
-rw-r--r-- | app/helpers/settings_helper.rb | 9 |
1 files 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), |