diff --git a/app/controllers/statics_controller.rb b/app/controllers/statics_controller.rb index f211319..f2891f3 100644 --- a/app/controllers/statics_controller.rb +++ b/app/controllers/statics_controller.rb @@ -1,5 +1,13 @@ class StaticsController < ApplicationController + def index + if current_user + redirect_to blogposts_path + else + redirect_to home_statics_path + end + end + def home end diff --git a/config/routes.rb b/config/routes.rb index b02bde6..9ab4310 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -51,5 +51,5 @@ Redstoner::Application.routes.draw do # post 'paypal' => 'paypal#create' - root to: 'statics#home' + root to: 'statics#index' end \ No newline at end of file