Skip to content
This repository was archived by the owner on Mar 9, 2020. It is now read-only.

Commit fa19fd6

Browse files
committed
Welcome#index now needs a login.
1 parent 0738413 commit fa19fd6

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

app/controllers/application_controller.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ class ApplicationController < ActionController::Base
22
# Prevent CSRF attacks by raising an exception.
33
# For APIs, you may want to use :null_session instead.
44
protect_from_forgery with: :exception
5+
6+
def not_authenticated
7+
redirect_to login_url, :alert => "First login to access this page."
8+
end
59
end
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class WelcomeController < ApplicationController
2+
before_filter :require_login, :only => :index
3+
24
def index
35
end
46
end

0 commit comments

Comments
 (0)