Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run validations for the #perform instance method #2

Open
naikipl opened this issue Feb 14, 2017 · 0 comments
Open

Run validations for the #perform instance method #2

naikipl opened this issue Feb 14, 2017 · 0 comments

Comments

@naikipl
Copy link

naikipl commented Feb 14, 2017

The perform instance method does not currently run validations, and it should.

Validations run perfectly for the class method:

MyUseCase.perform

Validations do not run for the instance method:

use_case = MyUseCase.new
use_case.perform

Since the instance method is intended to be overridden by the class that includes UseCasePattern, we can't just add the valid? check into the perform method. We need to figure out a way to do this smartly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant