Ruby on rails 提交带有嵌套参数的重定向

Ruby on rails 提交带有嵌套参数的重定向,ruby-on-rails,Ruby On Rails,控制器通常根据需要处理参数 [:pack][:event_id] 为了保持编码一致性,单独的操作需要通过私有方法调用相同的命令 然而,当创建一个重定向到的时,如何调用这个类/属性组合 redirect_to retry_packs_path(pack[event_id]: @genitore.event_id) 正在生成意外“:”,预期“)”重试包路径(包:{event\u id:@genitor.event\u id})重定向到重试包路径(“包[event\u id]”=>@genitor

控制器通常根据需要处理参数

[:pack][:event_id]
为了保持编码一致性,单独的操作需要通过私有方法调用相同的命令

然而,当创建一个重定向到的
时,如何调用这个类/属性组合

redirect_to retry_packs_path(pack[event_id]: @genitore.event_id)

正在生成
意外“:”,预期“)”

重试包路径(包:{event\u id:@genitor.event\u id})
重定向到重试包路径(“包[event\u id]”=>@genitor.event\u id)
重定向到重试包路径(包:{event\u id:@genitor.event\u id})