From 4a394d630a5ba07877e7750499337bc6259c90b1 Mon Sep 17 00:00:00 2001 From: Andreas Maierhofer Date: Thu, 14 Jun 2018 14:40:16 +0200 Subject: [PATCH] Adapt export jobs to new api refs hitobito/hitobito#429 --- app/jobs/youth/export/event_participations_export_job.rb | 8 ++------ spec/jobs/export/event_participations_export_job_spec.rb | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/jobs/youth/export/event_participations_export_job.rb b/app/jobs/youth/export/event_participations_export_job.rb index 9cfb16ec..752bb6ba 100644 --- a/app/jobs/youth/export/event_participations_export_job.rb +++ b/app/jobs/youth/export/event_participations_export_job.rb @@ -15,17 +15,13 @@ module Youth::Export::EventParticipationsExportJob private def exporter_with_ndbjs - if @controller_params[:ndbjs] && user_ability.can?(:show_details, entries.first) + if @options[:ndbjs] && ability.can?(:show_details, entries.first) Export::Tabular::People::ParticipationsNdbjs - elsif @controller_params[:sportdb] && user_ability.can?(:show_details, entries.first) + elsif @options[:sportdb] && ability.can?(:show_details, entries.first) Export::Tabular::People::ParticipationsSportdb else exporter_without_ndbjs end end - def user_ability - @user_ability ||= Ability.new(user) - end - end diff --git a/spec/jobs/export/event_participations_export_job_spec.rb b/spec/jobs/export/event_participations_export_job_spec.rb index d543d4c0..93992277 100644 --- a/spec/jobs/export/event_participations_export_job_spec.rb +++ b/spec/jobs/export/event_participations_export_job_spec.rb @@ -12,7 +12,6 @@ subject { Export::EventParticipationsExportJob.new(format, user.id, - course.id, event_participation_filter, params) }