-
Notifications
You must be signed in to change notification settings - Fork 37
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
Nested models error: " undefined method `reverse' for nil:NilClass " #27
Comments
We are also facing same issue which does not come if we remove this gem. |
Same error here. |
That's a +1. The error happens here: Is QR setting |
I could be wrong, but I believe this is caused by Rails running its built-in EXPLAIN query, and QueryReviewer running an EXPLAIN on that. I'm not sure it's anything to do with nested models. [EDIT: nevermind, I just reproduced it without an EXPLAIN. So much for that theory...] |
It works for me when going back to query_reviewer 0.1.6 |
No, unfortunately it does not. But this seems only to happen on POST requests. |
Hmm, anyone have a working theory for what's causing this? Unfortunately not using this project at the moment but still maintaining and happy to accept patches. |
Is everyone here using the mysql2 gem, and only seeing it on inserts? |
So... I can reproduce just by loading up Rails console, enabling query reviewer with : Thread.current["queries"] = QueryReviewer::SqlQueryCollection.new; Thread.current["query_reviewer_enabled"] = true and then performing an insert (eg The problem seems to result from some state being stored in the mysqladapter itself: ActiveRecord::ConnectionAdapters::DatabaseStatements#insert calls I think the problem results from the BindSubstitution class, which once you've run |
This error is still happening on rails 3.2.13 with latest query reviewer. |
Hello! I use nested models(think reason near this) and hard relations between them. When I try to create some model instance, i get such error in create action.
NoMethodError in AdvertsController#create
undefined method `reverse' for nil:NilClass
When gem is disabled - error disappears.
The text was updated successfully, but these errors were encountered: