Skip to content

Add find_each #17

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

Closed
wants to merge 2 commits into from
Closed

Add find_each #17

wants to merge 2 commits into from

Conversation

dplummer
Copy link
Contributor

No description provided.

@@ -44,5 +44,9 @@ def method_missing(method_name, *args, &block)
to_a.send(method_name, *args, &block)
end

def find_each(&block)
Query::FindEach.new(klass, params).call(&block)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems a little odd to make this it's own query class. The class really is just the base/index fetch with methods for doing the iteration. It seems like we could just do that logic here instead of adding an extra layer of abstraction.

@dplummer
Copy link
Contributor Author

I refactored that and removed the abstraction. You're right it isn't necessary here.

@dplummer
Copy link
Contributor Author

Don't merge this yet, got another refactor...

@chingor13 chingor13 closed this Feb 26, 2015
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