Migrate to Rais 8.0
- Remove all Rodauth stuff and implement simple custom auth - Migrate from sprockets to propshaft, hack some bootstrap stuff
This commit is contained in:
parent
0198a22278
commit
c35c7da6e0
66 changed files with 518 additions and 684 deletions
|
|
@ -1,5 +0,0 @@
|
|||
class Account < ApplicationRecord
|
||||
include Rodauth::Rails.model
|
||||
|
||||
enum :status, unverified: 1, verified: 2, closed: 3
|
||||
end
|
||||
4
app/models/current.rb
Normal file
4
app/models/current.rb
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
class Current < ActiveSupport::CurrentAttributes
|
||||
attribute :session
|
||||
delegate :user, to: :session, allow_nil: true
|
||||
end
|
||||
3
app/models/session.rb
Normal file
3
app/models/session.rb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
class Session < ApplicationRecord
|
||||
belongs_to :user
|
||||
end
|
||||
6
app/models/user.rb
Normal file
6
app/models/user.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class User < ApplicationRecord
|
||||
has_secure_password
|
||||
has_many :sessions, dependent: :destroy
|
||||
|
||||
normalizes :email_address, with: ->(e) { e.strip.downcase }
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue