refactor: improve countries find_resource method
- Update `find_resource` method to use `scoped_collection.friendly.find(params[:id])` This refactoring improves the find_resource method to work with friendly URLs, making it more robust and user-friendly.
This commit is contained in:
parent
84c224cf8d
commit
5bc06007b2
@ -1,4 +1,9 @@
|
||||
ActiveAdmin.register Country do
|
||||
controller do
|
||||
def find_resource
|
||||
scoped_collection.friendly.find(params[:id])
|
||||
end
|
||||
end
|
||||
# See permitted parameters documentation:
|
||||
# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user