Skip to content

Run validations for the #perform instance method #2

@naikipl

Description

@naikipl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions