Permalink
Browse files

fixing redirect for /episodes/archive

  • Loading branch information...
1 parent ce2971c commit 036fe4dc5596c1cefb3c44a259886eaed9c5e050 @ryanb committed Jun 23, 2011
Showing with 8 additions and 3 deletions.
  1. +1 −1 config/routes.rb
  2. +1 −1 public/404.html
  3. +1 −1 public/500.html
  4. +5 −0 spec/requests/episodes_request_spec.rb
View
@@ -7,12 +7,12 @@
match "login" => "users#login", :as => "login"
match "logout" => "users#logout", :as => "logout"
match "feedback" => "feedback_messages#new", :as => "feedback"
+ match "episodes/archive" => redirect("/?view=list")
resources :users
resources :comments
resources :episodes
resources :feedback_messages
match "tags/:id" => redirect("/?tag_id=%{id}")
- match "episodes/archive" => redirect("/?view=list")
end
View
@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Change Rejected - RailsCasts</title>
+ <title>Not Found - RailsCasts</title>
<meta name="description" content="Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers." />
<meta name="keywords" content="rails, ruby on rails, screencasts, railscast, railscasts, tips, tricks, tutorials, training, podcasts, programming" />
<link rel="alternate" type="application/rss+xml" title="Episodes RSS" href="http://feeds.feedburner.com/railscasts" />
View
@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Change Rejected - RailsCasts</title>
+ <title>Error Occurred - RailsCasts</title>
<meta name="description" content="Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers." />
<meta name="keywords" content="rails, ruby on rails, screencasts, railscast, railscasts, tips, tricks, tutorials, training, podcasts, programming" />
<link rel="alternate" type="application/rss+xml" title="Episodes RSS" href="http://feeds.feedburner.com/railscasts" />
@@ -115,4 +115,9 @@
page.current_path.should == episode_path(episode)
page.should have_content("Back to the Future")
end
+
+ it "redirects /episodes/archive to episodes list" do
+ visit "/episodes/archive"
+ page.current_url.should == root_url(:view => "list")
+ end
end

0 comments on commit 036fe4d

Please sign in to comment.