Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/52.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Rails:link_to with path with automatic scope参数_Ruby On Rails - Fatal编程技术网

Ruby on rails Rails:link_to with path with automatic scope参数

Ruby on rails Rails:link_to with path with automatic scope参数,ruby-on-rails,Ruby On Rails,我正在开发一个web应用程序,其中每个组织(组)都有自己的子域(作为名称空间)。不幸的是,它对heroku不起作用 所以我试图将整个概念从group\u name.myapp.com/resources改为myapp.com/group\u name/resources 这是我的路线文件 scope ':group' do resources :clients resources :carriers resources :transport_orders end

我正在开发一个web应用程序,其中每个组织(组)都有自己的子域(作为名称空间)。不幸的是,它对heroku不起作用

所以我试图将整个概念从
group\u name.myapp.com/resources
改为
myapp.com/group\u name/resources

这是我的路线文件

  scope ':group' do
    resources :clients
    resources :carriers
    resources :transport_orders
  end
在更改之前,我的链接运行良好,因为路径自动指向子域。现在,每个链接到的链接都需要指定:group参数

如何为链接自动指定
:group
参数,或者让我手动指定