Commit f27372a
authored
Our `method_missing` based proxying is technically eager to hopefully allow us to support more of Active Record's surface area cheaply. It's been working well for over 3 years, but there's some issues.
Notably, a `record.respond_to?` check is not enough and there's certain methods we don't want to proxy.
Stuff like Active Record's class-level configuration API via `abtract_class?`, `descends_from_active_record?`, `abstract_class=` and `primary_abstract_class=` to name a few.
So ideally opting out of proxying methods that end in `?` and `=` should be safe.
I'm not including `!` to allow `find_by!` to work.
Ref: rubyevents/rubyevents#873
Ref: #40
1 parent 6f73293 commit f27372a
File tree
2 files changed
+21
-5
lines changed- lib/active_record
- test/active_record
2 files changed
+21
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
47 | 63 | | |
48 | 64 | | |
49 | 65 | | |
| |||
0 commit comments