Defect #11545
Overwriting existing method Issue.open
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 0% | ||
Category: | Issues | |||
Target version: | 2.1.0 | |||
Resolution: | Fixed | Affected version: | 2.0.0 |
Description
Try
Project.first.issues.open => ArgumentError: wrong number of arguments (0 for 1)
Project.first.issues.open('public') => Errno::EACCES: Permission denied - public
From log:
Creating scope :open. Overwriting existing method Issue.open.
And others:
Creating scope :active. Overwriting existing method User.active.
Creating scope :open. Overwriting existing method Version.open.
etc..
Thanks for resolve
(workaround: Project.first.issues.visible.open)
Petr
Associated revisions
Prevents "Overwriting existing method Issue.open" warning (#11545).
Prevent "Overwriting existing method User.active" warning, scope is already defined on the base class (#11545).
Fixed that open scope on Project#issues raises an error (#11545).
Patch by Petr Pospisil.
Prevents "Overwriting existing method Issue.open" warning (#11545).
History
#1
Updated by Jean-Philippe Lang over 8 years ago
- Status changed from New to Confirmed
- Priority changed from Urgent to Normal
#2
Updated by Alexander Markelov over 8 years ago
- File kernel_open_method_fix.diff
added
I hope the following patch will help.
#3
Updated by Jean-Philippe Lang over 8 years ago
- Status changed from Confirmed to Closed
- Assignee set to Jean-Philippe Lang
- Target version set to 2.1.0
- Resolution set to Fixed
Patch committed in r10199 with a test. Thanks for the fix.
#4
Updated by Petr Pospisil over 8 years ago
Thank you!