Class: BulkImports::UserContributionsExportService
- Inherits:
-
Object
- Object
- BulkImports::UserContributionsExportService
- Defined in:
- app/services/bulk_imports/user_contributions_export_service.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(user_id, portable, jid) ⇒ UserContributionsExportService
constructor
A new instance of UserContributionsExportService.
Constructor Details
#initialize(user_id, portable, jid) ⇒ UserContributionsExportService
Returns a new instance of UserContributionsExportService.
5 6 7 8 9 |
# File 'app/services/bulk_imports/user_contributions_export_service.rb', line 5 def initialize(user_id, portable, jid) @user = User.find(user_id) @portable = portable @jid = jid end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/services/bulk_imports/user_contributions_export_service.rb', line 11 def execute # Set up query to get cached users and set it as user_contributions on the portable model @portable.user_contributions = UserContributionsExportMapper.new(@portable).get_contributing_users relation = BulkImports::FileTransfer::BaseConfig::USER_CONTRIBUTIONS_RELATION RelationExportService.new(@user, @portable, relation, @jid).execute end |