Big first commit
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled

authentication-zero and first layout
This commit is contained in:
2026-05-21 02:54:39 +02:00
parent 6e7fe9797a
commit 6f192274ab
49 changed files with 1933 additions and 17 deletions

11
app/models/session.rb Normal file
View File

@@ -0,0 +1,11 @@
class Session < ApplicationRecord
belongs_to :user
before_create do
self.user_agent = Current.user_agent
self.ip_address = Current.ip_address
end
after_create { user.events.create! action: "signed_in" }
after_destroy { user.events.create! action: "signed_out" }
end