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

The includes method didn't return valid value in Rails 5 #467

Open
elct9620 opened this issue Jan 8, 2018 · 2 comments
Open

The includes method didn't return valid value in Rails 5 #467

elct9620 opened this issue Jan 8, 2018 · 2 comments

Comments

@elct9620
Copy link

elct9620 commented Jan 8, 2018

Hi, all

I am working on a large project to upgrade Rails 4 to Rails 5. But we have some problem with includes method.

User.using(:user01).first.user_sessions.includes(:user_wishes).find { |s| s }

In Rails 4, it will return user_session but in Rails 5 it returns [] if we want to got correct value, we have to add to_a like below:

User.using(:user01).first.user_sessions.includes(:user_wishes).to_a.find { |s| s }

This happens many times in our project, and we have to add to_a to temporary let it works.

@shyam-habarakada
Copy link

Does this happen only when you are using Octopus?

@elct9620
Copy link
Author

elct9620 commented Mar 7, 2018

Yes, but I think it is resolved after I try to add some patch for #478.

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

No branches or pull requests

2 participants