@@ -27,7 +27,7 @@ def pagination
2727 events = ''
2828 unless email_notifications_configuration . first . is_a? ( FalseClass )
2929 configuration = email_notifications_configuration . select { |event | event [ :kbAccountId ] == row . account_id }
30- events = configuration . map { | event | event [ :eventType ] } . join ( ', ' )
30+ events = configuration . pluck ( :eventType ) . join ( ', ' )
3131 end
3232
3333 data << [
@@ -37,20 +37,20 @@ def pagination
3737 view_context . link_to ( 'Edit' . html_safe ,
3838 '#configureEmailNotification' ,
3939 data : { name : row . name , account_id : row . account_id ,
40- events : events , bs_toggle : 'modal' , target : '#configureEmailNotification' } )
40+ events :, bs_toggle : 'modal' , target : '#configureEmailNotification' } )
4141 ]
4242 end
4343
4444 respond_to do |format |
45- format . json { render json : { data : data , recordsTotal : record_total , recordsFiltered : record_total } }
45+ format . json { render json : { data :, recordsTotal : record_total , recordsFiltered : record_total } }
4646 end
4747 end
4848
4949 def events_to_consider
5050 data = Kenui ::EmailNotificationService . get_events_to_consider ( options_for_klient )
5151
5252 respond_to do |format |
53- format . json { render json : { data : data } }
53+ format . json { render json : { data : } }
5454 end
5555 end
5656
@@ -59,14 +59,14 @@ def configuration
5959 data = Kenui ::EmailNotificationService . get_configuration_per_account ( account_id , options_for_klient )
6060
6161 respond_to do |format |
62- format . json { render json : { data : data } }
62+ format . json { render json : { data : } }
6363 end
6464 end
6565
6666 def set_configuration
6767 configuration = params . require ( :configuration )
6868
69- event_types = Array ( configuration [ :event_types ] ) . reject ( & :blank? )
69+ event_types = Array ( configuration [ :event_types ] ) . compact_blank
7070
7171 is_success , message = Kenui ::EmailNotificationService . set_configuration_per_account ( configuration [ :account_id ] ,
7272 event_types ,
0 commit comments