aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrhenium <re4k@re4k.info>2013-05-18 22:11:52 +0900
committerrhenium <re4k@re4k.info>2013-05-18 22:11:52 +0900
commit2cc364a14c3211eaaac05c5d75591e7b70c7a8ca (patch)
tree7f31c4659c601cd2be148a9d8402bbf1f3d0072f
parentc91bc3a5234fc02cfeaec7d1678af8c30a15e5a2 (diff)
downloadaclog-2cc364a14c3211eaaac05c5d75591e7b70c7a8ca.tar.gz
rename MainController
-rw-r--r--app/controllers/about_controller.rb (renamed from app/controllers/main_controller.rb)2
-rw-r--r--app/controllers/report_controller.rb3
-rw-r--r--app/views/about/about.html.haml (renamed from app/views/main/about.html.haml)0
-rw-r--r--app/views/about/api.html.haml (renamed from app/views/main/api.html.haml)0
-rw-r--r--app/views/about/index.html.haml (renamed from app/views/main/index.html.haml)0
-rw-r--r--app/views/shared/sidebar/_about.html.haml (renamed from app/views/shared/sidebar/_main.html.haml)0
-rw-r--r--config/routes.rb3
7 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/main_controller.rb b/app/controllers/about_controller.rb
index 218896f..b3af95d 100644
--- a/app/controllers/main_controller.rb
+++ b/app/controllers/about_controller.rb
@@ -1,4 +1,4 @@
-class MainController < ApplicationController
+class AboutController < ApplicationController
def index
@title = "aclog"
render layout: "index"
diff --git a/app/controllers/report_controller.rb b/app/controllers/report_controller.rb
index 15fd926..8483050 100644
--- a/app/controllers/report_controller.rb
+++ b/app/controllers/report_controller.rb
@@ -9,9 +9,6 @@ class ReportController < ApplicationController
original_id, tweet_id = [get_tweet_id(params[:tweet_id_0]), get_tweet_id(params[:tweet_id_1])].sort
raise ActionController::BadRequest unless original_id && tweet_id
- # 何かがおかしいよ
-
- end
tweet = Tweet.find(tweet_id)
if tweet
diff --git a/app/views/main/about.html.haml b/app/views/about/about.html.haml
index 7347928..7347928 100644
--- a/app/views/main/about.html.haml
+++ b/app/views/about/about.html.haml
diff --git a/app/views/main/api.html.haml b/app/views/about/api.html.haml
index 8a1e6ff..8a1e6ff 100644
--- a/app/views/main/api.html.haml
+++ b/app/views/about/api.html.haml
diff --git a/app/views/main/index.html.haml b/app/views/about/index.html.haml
index 2a59ce6..2a59ce6 100644
--- a/app/views/main/index.html.haml
+++ b/app/views/about/index.html.haml
diff --git a/app/views/shared/sidebar/_main.html.haml b/app/views/shared/sidebar/_about.html.haml
index 774d930..774d930 100644
--- a/app/views/shared/sidebar/_main.html.haml
+++ b/app/views/shared/sidebar/_about.html.haml
diff --git a/config/routes.rb b/config/routes.rb
index 2972d2b..5eb847b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -4,7 +4,6 @@ Aclog::Application.routes.draw do
screen_name_b: /[a-zA-Z0-9_]{1,20}/,
}
- # MainController
root to: "main#index"
scope format: false, constraints: constraints do
@@ -19,7 +18,7 @@ Aclog::Application.routes.draw do
get "/i/report" => "report#index", as: "report"
post "/i/report/tweet" => "report#tweet"
- scope "about", controller: "main" do
+ scope "about", controller: "about" do
get "/", action: "about", as: "about"
get "/api", action: "api", as: "about_api"
end