0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

routesに関してうろ覚えだったので復習

Posted at

routesで定義できること

受け取ったurlを認識して、適切なcontrollerアクションにつなげる。

複数のルーティング間で共通の動作として定義

concern :exanple do
  resources :rei
end

resources :aaa, concerns: :example


resources :aaa do
resources :rei
end

ネストされてるrouteで同時にコントローラーにパスを送る書き方

<%= link_to 'title', a_b_path(@a, @b) %>
<%= link_to 'title', url_for([@a, @b]) %>

また調べたら追記していきます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?