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

NullObject should respond to #to_a and return empty Array #35

Merged
merged 1 commit into from
Jan 30, 2014

Conversation

webgago
Copy link

@webgago webgago commented Jun 17, 2013

because you code may containt code like this:
ActiveRecord::Base.connection.execute(query).to_a.flatten.first

because you code may containt code like this:
ActiveRecord::Base.connection.execute(query).to_a.flatten.first
@blaet
Copy link

blaet commented Jan 30, 2014

Awesome, thanks!

blaet added a commit that referenced this pull request Jan 30, 2014
NullObject now implements #to_a and returns empty Array
@blaet blaet merged commit d213c6f into nulldb:master Jan 30, 2014
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