administrate icon indicating copy to clipboard operation
administrate copied to clipboard

polymorphic route arguments issue on update route

Open remy727 opened this issue 4 years ago • 0 comments

Steps to reproduce

Upgrade rails version from 5.2.4.3 to 5.2.4.6

Expected behavior

Show page needs to be shown after Update.

Actual behavior

When update, it doesn't redirect to show page and this error is showing.

ArgumentError in Admin::ProductsController#update
Please use symbols for polymorphic route arguments.

System configuration

Ruby version: 2.4.0 Rails version: 5.2.4.6

Thoughts

I think this line needs to be updated.

# current
def after_resource_updated_path(requested_resource)
   [namespace, requested_resource]
end

# new
def after_resource_updated_path(requested_resource)
   [namespace.to_sym, requested_resource]
end

remy727 avatar Aug 23 '21 23:08 remy727