aaronmallen/activeinteractor

View on GitHub
lib/rails/generators/templates/interactor.erb

Summary

Maintainability
Test Coverage
# frozen_string_literal: true

class <%= class_name %> < ApplicationInteractor
<%- if skip_context? && !context_attributes.empty? -%>
  context_attributes <%= context_attributes.map { |a| ":#{a}" }.join(', ') %>

<%- end -%>
  def perform
    # TODO implement <%= class_name %> call
  end

  def rollback
    # TODO implement <%= class_name %> rollback
  end
end