Mercurial > rsstweet
changeset 38:9e03bbbb1d43
Move static#index to tweet#index.
author | edogawaconan <me@myconan.net> |
---|---|
date | Thu, 11 Dec 2014 15:47:36 +0900 |
parents | 81f23f5bf85d |
children | aa6d58c8653b |
files | app/controllers/static_controller.rb app/controllers/tweets_controller.rb app/views/static/index.html.erb app/views/tweets/index.html.erb config/routes.rb test/controllers/static_controller_test.rb test/controllers/tweets_controller_test.rb |
diffstat | 7 files changed, 23 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controllers/static_controller.rb Thu Dec 11 15:44:51 2014 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -class StaticController < ApplicationController - def index - end -end
--- a/app/controllers/tweets_controller.rb Thu Dec 11 15:44:51 2014 +0900 +++ b/app/controllers/tweets_controller.rb Thu Dec 11 15:47:36 2014 +0900 @@ -1,4 +1,7 @@ class TweetsController < ApplicationController + def index + end + def show @tweets = Tweet.new(params[:id]).timeline
--- a/app/views/static/index.html.erb Thu Dec 11 15:44:51 2014 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<head> - <title>rsstweet</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -</head> -<body> - <h1>rsstweet</h1> - <p>Proxying any user's tweet for usage with RSS readers</p> - <ul> - <li> - Source: <a href="http://bitbucket.org/edogawaconan/rsstweet">Bitbucket</a> - </li> - </ul> -</body>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/views/tweets/index.html.erb Thu Dec 11 15:47:36 2014 +0900 @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<head> + <title>rsstweet</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +</head> +<body> + <h1>rsstweet</h1> + <p>Proxying any user's tweet for usage with RSS readers</p> + <ul> + <li> + Source: <a href="http://bitbucket.org/edogawaconan/rsstweet">Bitbucket</a> + </li> + </ul> +</body>
--- a/config/routes.rb Thu Dec 11 15:44:51 2014 +0900 +++ b/config/routes.rb Thu Dec 11 15:47:36 2014 +0900 @@ -3,7 +3,7 @@ # See how all your routes lay out with "rake routes". # You can have the root of your site routed with "root" - root "static#index" + root "tweets#index" get "*id" => "tweets#show", :defaults => { :format => :atom }
--- a/test/controllers/static_controller_test.rb Thu Dec 11 15:44:51 2014 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -require "test_helper" - -class StaticControllerTest < ActionController::TestCase - test "should get index" do - get :index - assert_response :success - end -end
--- a/test/controllers/tweets_controller_test.rb Thu Dec 11 15:44:51 2014 +0900 +++ b/test/controllers/tweets_controller_test.rb Thu Dec 11 15:47:36 2014 +0900 @@ -5,4 +5,9 @@ get :show, :id => "edogawa_test", :format => :atom assert_response :success end + + test "should get index" do + get :index + assert_response :success + end end