Skip to content

Commit

Permalink
Adapt export jobs to new api
Browse files Browse the repository at this point in the history
  • Loading branch information
amaierhofer committed Jun 14, 2018
1 parent 25269a2 commit 4a394d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 2 additions & 6 deletions app/jobs/youth/export/event_participations_export_job.rb
Expand Up @@ -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
1 change: 0 additions & 1 deletion spec/jobs/export/event_participations_export_job_spec.rb
Expand Up @@ -12,7 +12,6 @@

subject { Export::EventParticipationsExportJob.new(format,
user.id,
course.id,
event_participation_filter,
params) }

Expand Down

0 comments on commit 4a394d6

Please sign in to comment.