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) }