Routing Error - No route matches when using button_to with custom action

后端 未结 3 2035
礼貌的吻别
礼貌的吻别 2021-01-23 11:34

I have the following button to download a file.

= button_to \'download\', action: \'download\', method: \'get\'

And I have a download

3条回答
  •  广开言路
    2021-01-23 11:38

    Try this, it should work with your view code just change into routes.rb

    resources :movies do
        get :download, :on => :collection
    end
    

提交回复
热议问题