redirect logged in users to news, others to home
This commit is contained in:
@@ -1,5 +1,13 @@
|
|||||||
class StaticsController < ApplicationController
|
class StaticsController < ApplicationController
|
||||||
|
|
||||||
|
def index
|
||||||
|
if current_user
|
||||||
|
redirect_to blogposts_path
|
||||||
|
else
|
||||||
|
redirect_to home_statics_path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def home
|
def home
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -51,5 +51,5 @@ Redstoner::Application.routes.draw do
|
|||||||
|
|
||||||
# post 'paypal' => 'paypal#create'
|
# post 'paypal' => 'paypal#create'
|
||||||
|
|
||||||
root to: 'statics#home'
|
root to: 'statics#index'
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user