Skip to content

Commit 14e9e82

Browse files
committed
fix !563
1 parent a8d3af7 commit 14e9e82

File tree

2 files changed

+7
-22
lines changed

2 files changed

+7
-22
lines changed

app/views/protips/_protip.html.haml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@
8686
%ul#tags.cf{itemprop: :keywords}
8787
- protip.topic_list.each do |tag|
8888
%li
89-
%a{ href: "/p/t/#{ tag.parameterize }" }
90-
= tag
89+
= link_to tag, protips_path(search: tag.parameterize)
9190
- if is_admin?
9291
= link_to 'delete', delete_tag_protip_path(protip.public_id, CGI.escape(tag)), method: :post, class: "delete"
9392

config/routes.rb

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# == Route Map
22
#
3-
# GET /.json(.:format) #<Proc:0x00000008e12370@/home/vagrant/web/config/routes.rb:270>
4-
# GET /teams/.json(.:format) #<Proc:0x00000008e324e0@/home/vagrant/web/config/routes.rb:271>
3+
# GET /.json(.:format) #<Proc:0x007f7b690e4cf0@/vagrant/config/routes.rb:256>
4+
# GET /teams/.json(.:format) #<Proc:0x007f7b690ea178@/vagrant/config/routes.rb:257>
55
# /mail_view MailPreview
66
# protips_update GET|PUT /protips/update(.:format) protips#update
77
# protip_update GET|PUT /protip/update(.:format) protip#update
@@ -51,23 +51,10 @@
5151
# protip GET /p/:id(.:format) protips#show
5252
# PUT /p/:id(.:format) protips#update
5353
# DELETE /p/:id(.:format) protips#destroy
54-
# featured_networks GET /n/featured(.:format) networks#featured {:slug=>/[\dA-Z\-]/i}
55-
# user_networks GET /n/u/:username(.:format) networks#user {:slug=>/[\dA-Z\-]/i}
56-
# tagged_network GET /n/:id/t(/*tags)(.:format) networks#tag {:slug=>/[\dA-Z\-]/i}
57-
# members_network GET /n/:id/members(.:format) networks#members {:slug=>/[\dA-Z\-]/i}
58-
# mayor_network GET /n/:id/mayor(.:format) networks#mayor {:slug=>/[\dA-Z\-]/i}
59-
# expert_network GET /n/:id/expert(.:format) networks#expert {:slug=>/[\dA-Z\-]/i}
6054
# join_network POST /n/:id/join(.:format) networks#join {:slug=>/[\dA-Z\-]/i}
6155
# leave_network POST /n/:id/leave(.:format) networks#leave {:slug=>/[\dA-Z\-]/i}
62-
# update_tags_network POST /n/:id/update-tags(.:format) networks#update_tags {:slug=>/[\dA-Z\-]/i}
63-
# current_mayor_network GET /n/:id/current-mayor(.:format) networks#current_mayor {:slug=>/[\dA-Z\-]/i}
6456
# networks GET /n(.:format) networks#index {:slug=>/[\dA-Z\-]/i}
65-
# POST /n(.:format) networks#create {:slug=>/[\dA-Z\-]/i}
66-
# new_network GET /n/new(.:format) networks#new {:slug=>/[\dA-Z\-]/i}
67-
# edit_network GET /n/:id/edit(.:format) networks#edit {:slug=>/[\dA-Z\-]/i}
6857
# network GET /n/:id(.:format) networks#show {:slug=>/[\dA-Z\-]/i}
69-
# PUT /n/:id(.:format) networks#update {:slug=>/[\dA-Z\-]/i}
70-
# DELETE /n/:id(.:format) networks#destroy {:slug=>/[\dA-Z\-]/i}
7158
# protips GET /trending(.:format) protips#index
7259
# faq GET /faq(.:format) pages#show {:page=>:faq}
7360
# tos GET /tos(.:format) pages#show {:page=>:tos}
@@ -297,9 +284,9 @@
297284
get 'd/:date(/:start)' => 'protips#date', as: :date
298285
get 't/trending' => 'protips#trending', as: :trending_topics
299286
get 't/by_tags' => 'protips#by_tags', as: :by_tags
300-
get 't/(/*tags)' => 'networks#tag', as: :tagged
301-
put 't/(/*tags)/subscribe' => 'protips#subscribe', as: :subscribe
302-
put 't/(/*tags)/unsubscribe' => 'protips#unsubscribe', as: :unsubscribe
287+
get 't/(*tags)' => 'networks#tag', as: :tagged
288+
put 't/(*tags)/subscribe' => 'protips#subscribe', as: :subscribe
289+
put 't/(*tags)/unsubscribe' => 'protips#unsubscribe', as: :unsubscribe
303290
get 'fresh'
304291
get 'trending'
305292
get 'popular'
@@ -321,9 +308,8 @@
321308
end
322309
end
323310

324-
resources :networks, path: '/n', constraints: { slug: /[\dA-Z\-]/i } do
311+
resources :networks, path: '/n', constraints: { slug: /[\dA-Z\-]/i } , only: [ :index, :show]do
325312
member do
326-
get '/t/(/*tags)' => 'networks#tag', as: :tagged
327313
post '/join' => 'networks#join', as: :join
328314
post '/leave' => 'networks#leave', as: :leave
329315
end

0 commit comments

Comments
 (0)