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

ActiveRecord helper methods #119

Closed
aaronmallen opened this issue Jan 16, 2020 · 0 comments · Fixed by #124
Closed

ActiveRecord helper methods #119

aaronmallen opened this issue Jan 16, 2020 · 0 comments · Fixed by #124
Labels
feature New feature or request
Milestone

Comments

@aaronmallen
Copy link
Owner

Elevator pitch, describe and sell us your feature request

As a developer,
I want to be able to use my ActiveRecord models as context classes
so that I don't need to create separate context classes for my interactors when the output is just going to be fed to a model anyway.

Is your feature request related to a problem

Have you considered any alternatives

Additional Comments

We should provide a helper method for ActiveRecord models, something like acts_as_context that would include ActiveInteractor::Context::Base status methods (i.e. #fail!, #called, etc...). This way we could call the contextualize_with method in a given interactor and set the value to one of our ActiveRecord model classes.

@aaronmallen aaronmallen added feature New feature or request rails labels Jan 16, 2020
@aaronmallen aaronmallen added this to the v1.0.0 milestone Jan 16, 2020
This was referenced Jan 16, 2020
aaronmallen added a commit that referenced this issue Jan 21, 2020
 - Added: `ActiveInteractor::Context::Status`
 - Added: `ActiveInteractor::Rails::ActiveRecord`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant