aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/account.rb
Commit message (Collapse)AuthorAgeFilesLines
* Generate delegation methods to named scope in the definition timeRyuta Kamizono2018-10-091-3/+10
| | | | | | | | | | | | | | | | | | | The delegation methods to named scope are defined when `method_missing` is invoked on the relation. Since #29301, the receiver in the named scope is changed to the relation like others (e.g. `default_scope`, etc) for consistency. Most named scopes would be delegated from relation by `method_missing`, since we don't allow scopes to be defined which conflict with instance methods on `Relation` (#31179). But if a named scope is defined with the same name as any method on the `superclass` (e.g. `Kernel.open`), the `method_missing` on the relation is not invoked. To address the issue, make the delegation methods to named scope is generated in the definition time. Fixes #34098.
* Extract `Account` model to the dedicated fileRyuta Kamizono2017-07-221-0/+34