Rails + Vue.jsでアプリを作成しています
ルーティングがAPIとそうでないものに分かれてしまっているのですが、API以外のパスでは'tops#index'のerbファイルを適用させたいと思っています
ですが以下のようにするとapiのパスでも'tops#index'が適用されてしまいます
api以外で指定する方法はありませんでしょうか?
get '*path', to: 'tops#index' namespace :api,{format: 'json'} do namespace :v1 do resources :tweets do collection do get :category end resources :comments,only: [:create,:destroy,:index] resources :likes, only: [:index, :create, :destroy] end end end resources :tweets do resources :comments,only:[:create,:destroy] resources :likes,only:[:create,:destroy] end
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/04/18 06:58