diff options
author | David Gay <david@davidgay.org> | 2021-04-21 22:30:32 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-04-21 22:30:32 -0400 |
commit | 62a3d19900247fe26d46f140a568b6ce5996b0f4 (patch) | |
tree | b292f5472df886b7fbe021f95ad8037e446c98a8 /app | |
parent | 3deaa18cfc4103f0cf6dd6de479f07d0d2db1abf (diff) |
Devise setup and config
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/application_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/home_controller.rb | 2 | ||||
-rw-r--r-- | app/models/user.rb | 6 |
3 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 09705d1..6b4dcfa 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,2 +1,3 @@ class ApplicationController < ActionController::Base + before_action :authenticate_user! end diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 13e5d35..57f762e 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class HomeController < ApplicationController - #skip_before_action :authenticate_user! + skip_before_action :authenticate_user! def index end diff --git a/app/models/user.rb b/app/models/user.rb new file mode 100644 index 0000000..6083f21 --- /dev/null +++ b/app/models/user.rb @@ -0,0 +1,6 @@ +class User < ApplicationRecord + # Include default devise modules. Others available are: + # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable + devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable, :trackable, + :confirmable, :lockable +end |