You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request rails#54163 from jagthedrummer/jeremy/resource-route-verbosity-fix
[Fixrails#54134] Add resource name to the `ArgumentError` that's raised when invalid `:only` or `:except` options are given to `#resource` or `#resources`
Copy file name to clipboardExpand all lines: actionpack/CHANGELOG.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,19 @@
1
+
* Add resource name to the `ArgumentError` that's raised when invalid `:only` or `:except` options are given to `#resource` or `#resources`
2
+
3
+
This makes it easier to locate the source of the problem, especially for routes drawn by gems.
4
+
5
+
Before:
6
+
```
7
+
:only and :except must include only [:index, :create, :new, :show, :update, :destroy, :edit], but also included [:foo, :bar]
8
+
```
9
+
10
+
After:
11
+
```
12
+
Route `resources :products` - :only and :except must include only [:index, :create, :new, :show, :update, :destroy, :edit], but also included [:foo, :bar]
13
+
```
14
+
15
+
*Jeremy Green*
16
+
1
17
* Add `check_collisions` option to `ActionDispatch::Session::CacheStore`.
2
18
3
19
Newly generated session ids use 128 bits of randomness, which is more than
expected_message=":only and :except must include only [:index, :create, :new, :show, :update, :destroy, :edit], but also included [:foo, :bar]"
1134
+
expected_message="Route `resources :products` - :only and :except must include only [:index, :create, :new, :show, :update, :destroy, :edit], but also included [:foo, :bar]"
expected_message=":only and :except must include only [:show, :create, :update, :destroy, :new, :edit], but also included [:foo, :bar]"
1145
+
expected_message="Route `resource :products` - :only and :except must include only [:show, :create, :update, :destroy, :new, :edit], but also included [:foo, :bar]"
expected_message=":only and :except must include only [:index, :create, :new, :show, :update, :destroy, :edit], but also included [:foo]"
1156
+
expected_message="Route `resources :products` - :only and :except must include only [:index, :create, :new, :show, :update, :destroy, :edit], but also included [:foo]"
expected_message=":only and :except must include only [:show, :create, :update, :destroy, :new, :edit], but also included [:foo]"
1168
+
expected_message="Route `resource :products` - :only and :except must include only [:show, :create, :update, :destroy, :new, :edit], but also included [:foo]"
0 commit comments