1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-31 12:49:38 +00:00

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
This commit is contained in:
Toshi MARUYAMA 2020-07-04 12:14:19 +00:00
parent 0b138f1c4e
commit a425be37b8

View 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),