Commit 476371d
committed
Drop virtual_delegates_to_define
By defining the ruby method up front and registering the arel and uses,
the code can use the new simplified virtual attribute registration process.
Care does need to go into ensuring that virtual_delegate_arel does not access the schema
Do note, we are not passing options into virtual_attributes, which get passed to Type.lookup.
This was not working for virtual_delegates before.
TBH/ I don't know if we use this in the type lookup. Maybe these are be used when using array types?
It looks like rails uses the options for the matchers. It wasn't fully clear for me.1 parent 7cec00f commit 476371d
File tree
2 files changed
+1
-29
lines changed- lib/active_record
- virtual_attributes
2 files changed
+1
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 101 | | |
106 | 102 | | |
107 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
| |||
37 | 33 | | |
38 | 34 | | |
39 | 35 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 36 | + | |
44 | 37 | | |
45 | 38 | | |
46 | 39 | | |
47 | 40 | | |
48 | 41 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 42 | | |
67 | 43 | | |
68 | 44 | | |
| |||
0 commit comments