Skip to content

Commit 0977170

Browse files
committed
Change route precedence of user_protips to come before slug_protips
1 parent 523c2c5 commit 0977170

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/routes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
resources :protips, :path => '/p' do
2626
collection do
27+
get 'u/:username' => 'protips#user', as: :user
2728
get ':id/:slug' => 'protips#show', as: :slug, :constraints => {:slug => /(?!.*?edit).*/}
2829
get 'random'
2930
get 'search' => 'protips#search', as: :search
@@ -34,7 +35,6 @@
3435
get 'd/:date(/:start)' => 'protips#date', as: :date
3536
get 't/trending' => 'protips#trending', as: :trending_topics
3637
get 't/by_tags' => 'protips#by_tags', as: :by_tags
37-
get 'u/:username' => 'protips#user', as: :user
3838
get 't/(/*tags)' => 'networks#tag', as: :tagged
3939
put 't/(/*tags)/subscribe' => 'protips#subscribe', as: :subscribe
4040
put 't/(/*tags)/unsubscribe' => 'protips#unsubscribe', as: :unsubscribe

0 commit comments

Comments
 (0)