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

Introduce Hanami::Interactor properly #84

Merged
merged 3 commits into from
Apr 15, 2016
Merged

Introduce Hanami::Interactor properly #84

merged 3 commits into from
Apr 15, 2016

Conversation

ariejan
Copy link
Owner

@ariejan ariejan commented Apr 6, 2016

See http://www.rubydoc.info/gems/hanami-utils/Hanami/Interactor/Interface, it's part of Uncle Bob's Clean Architecture idea and makes a lot of sense. Firefly does not use Interactors, but it should.

@ariejan ariejan added this to the 2.0 milestone Apr 4, 2016
@ariejan ariejan removed the ★★★ label Apr 6, 2016
@ariejan ariejan self-assigned this Apr 6, 2016
@volgorean
Copy link
Contributor

def call
   ItemRepository.transaction do
   @item = ItemRepository.find_by_content(@item) || ItemRepository.persist(@item)
   LinkHtmlTitleWorker.perform_async(@item.id)
end

Do we want to create a worker and perform another title fetch if @item isn't a new Object?
It's probably not an issue just making sure that was intended.

@ariejan
Copy link
Owner Author

ariejan commented Apr 6, 2016

@volgorean actually that was intentional. If I saved a URL like 10 months ago, and I'm saving it again now, I'd like the title to be updated.

@ariejan ariejan added the W.I.P. label Apr 6, 2016
@volgorean
Copy link
Contributor

Good point.

@ariejan ariejan merged commit 0641037 into master Apr 15, 2016
@ariejan ariejan deleted the fix/interactors branch April 15, 2016 10:46
@ariejan ariejan modified the milestone: 2.0 Jun 1, 2017
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

Successfully merging this pull request may close these issues.

2 participants