Commit b3aa361
authored
ActiveAdmin: Allow for both singular and plural model names (#776)
This is an addition to this PR: #692
I've seen it's been stale for a while and it's rather simple fix.
I noticed my ActiveAdmin resources are not being annotated.
I know ActiveAdmin uses plural model names, but, as far as I remember, they used to use singular model names in the past.
We can see some "evidence" of that here: https://activeadmin.info/2-resource-customization.html#customizing-parent-menu-items
Probably in other places as well.
In order to keep the gem working as expected for singular ActiveAdmin resources, I suggest we annotate both singular and plural model names.
I just tested this out in a project of mine where I renamed one file to be in singular form and left the other files in plural form.
It worked like a charm. :)1 parent 508d06a commit b3aa361
File tree
2 files changed
+6
-5
lines changed- lib/annotate/annotate_models
- spec/lib/annotate/annotate_models
2 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 122 | + | |
| 123 | + | |
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
| |||
0 commit comments