You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was sadly unable to create a minimal, complete, and verifiable example from our codebase, but basically at work we have a class ProjectsController < ApplicationController and from what I can tell, almost all tests that touch it fail using v5.0.1.rc1.
I'll try to find a short executable example. Meanwhile I was able to pinpoint the commit using git bisect.
ba66ed094a5007e0746976781729d5d9e71b8cc9 is the first bad commit
commit ba66ed094a5007e0746976781729d5d9e71b8cc9
Author: Matthew Draper <matthew@trebex.net>
Date: Fri Nov 25 00:48:00 2016 +1030
Merge pull request #26718 from domcleal/5-0-stable-ids-writer-exception
Restore RecordNotFound when *_ids= can't find records by ID
:040000 040000 fe2be16d3e4dbd1aa10d4e05db58c4a6d56d425f 74ff037d2109bea49fba4c5c9828a44e9688eb5c M activerecord
But I'll try to bisect once more later in the afternoon to verify.
To me it seems that before it resolved correctly to ProjectsController but in v5.0.1.rc1 it resolves to Project::Controller (unless of course, this is used internally somewhere).
Expected behavior
Testcases should work and find the ProjectsController constant.
Actual behavior
Running a spec which accesses the controller, using --backtrace results in the following error:
I think this is a bug in how ba66ed0 / #26718 interacts with has_many :through + explicit class_name and/or source... I imagine it would have the same problem with any other, less suspiciously-similar-to-other-parts-of-Rails, name too.
Steps to reproduce
I was sadly unable to create a minimal, complete, and verifiable example from our codebase, but basically at work we have a
class ProjectsController < ApplicationController
and from what I can tell, almost all tests that touch it fail using v5.0.1.rc1.I'll try to find a short executable example. Meanwhile I was able to pinpoint the commit using
git bisect
.But I'll try to bisect once more later in the afternoon to verify.
To me it seems that before it resolved correctly to
ProjectsController
but in v5.0.1.rc1 it resolves toProject::Controller
(unless of course, this is used internally somewhere).Expected behavior
Testcases should work and find the
ProjectsController
constant.Actual behavior
Running a spec which accesses the controller, using
--backtrace
results in the following error:System configuration
Rails version:
v5.0.1.rc1
Ruby version:
2.3.1
The text was updated successfully, but these errors were encountered: