Skip to content

Commit 8bc3c7d

Browse files
committed
fix test slug protip test
1 parent 82d71a1 commit 8bc3c7d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

app/controllers/protips_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def show
135135
end
136136

137137
return redirect_to protip_missing_destination, notice: "The pro tip you were looking for no longer exists" if @protip.nil?
138-
return redirect_to protip_path(@protip.public_id<<'/'<<@protip.friendly_id, :p => params[:p], :q => params[:q]) if params[:slug]!=@protip.friendly_id
138+
return redirect_to slug_protips_path(id: @protip.public_id, slug: @protip.friendly_id, :p => params[:p], :q => params[:q]) if params[:slug]!=@protip.friendly_id
139139

140140
@comments = @protip.comments
141141
@reply_to = show_params[:reply_to]

config/routes.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# == Route Map
22
#
33
# Prefix Verb URI Pattern Controller#Action
4-
# GET /.json(.:format) #<Proc:0x007f88532a57f0@/home/abdelkader/RubymineProjects/coderwall/config/routes.rb:263>
5-
# GET /teams/.json(.:format) #<Proc:0x007f88532c2030@/home/abdelkader/RubymineProjects/coderwall/config/routes.rb:264>
6-
# protips_update GET|PUT /protips/update(.:format) protips#update
7-
# protip_update GET|PUT /protip/update(.:format) protip#update
4+
# GET /.json(.:format) #<Proc:0x007f88aad85380@/vagrant/config/routes.rb:270>
5+
# GET /teams/.json(.:format) #<Proc:0x007f88aad6e720@/vagrant/config/routes.rb:271>
86
# welcome GET /welcome(.:format) home#index
97
# root GET / protips#index
108
# p_dpvbbg GET /p/dpvbbg(.:format) protips#show {:id=>"devsal"}

0 commit comments

Comments
 (0)