モデルの関連付けを表示するためにwill_paginateを使用しています。次のようにカスタムルートを設定します。
get '/profile/:slug' => 'talents#show', :as => :talent
get '/profile/:slug/bio' => 'talents#show', :as => :talent_bio
get '/profile/:slug/instagram' => 'talents#show', :as => :talent_instagram
talent_instagram routeを使用している場合、代わりにすべてのページネーションリンクがデフォルトルートにレンダリングされます。つまり、次の代わりに:
http:://0.0.0.0:3000/profile/some-talent/instagram?page=5
これが私たちが得るものです:
http:://0.0.0.0:3000/profile/some-talent?page=5
最初の2つのルートをコメントアウトすると、正しいリンクが使用されます。will_paginateがデフォルトで最初のルートになるのはなぜですか?