Created
November 11, 2016 17:43
-
-
Save bhserna/554fd706f67001e68a3015bc46a0dac0 to your computer and use it in GitHub Desktop.
5 Rules - Inject dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Admin::ProjectFundingTerminationsController < Admin::BaseController | |
def destroy | |
Projects.revert_funding_termination( | |
find_project, | |
projects_store: Project, | |
receipts_cancelator: ReceiptsCancelator | |
) | |
redirect_to admin_projects_path | |
end | |
private | |
def find_project | |
Project.find_by_slug params[:project_id] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment