rodauth-model 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -3
- data/README.md +3 -3
- data/lib/rodauth/model/sequel.rb +1 -1
- data/rodauth-model.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59bbf27ffd624fa72ce609fcb9968118bf358e3e3f10893db7d0d73abf356d12
|
4
|
+
data.tar.gz: 2c286827b98cef9f1d593f740375ae2f74c759dee7dd2d7c954380a03659ecd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8ef44bd93fc5cdb4fabaf58544bcf3ddc7ab8084a6a38b73777cb26163fe0ad8ded45978975cf4423b8f44b97e1c49dc9d3d01f6ca7aac71f06d120a7bebf5b
|
7
|
+
data.tar.gz: 9d8067365baec855fed3ad8f2db189d8842e3244b2867ca6b67413715ddd15465aa7f5db1d416f80e4925df2b226f7edda80e68cd40a83a0697e7a1cfe669644
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,13 @@
|
|
1
|
+
## 0.2.1 (2022-10-26)
|
2
|
+
|
3
|
+
* Fix `elsif` warning in sequel code (@janko)
|
4
|
+
|
1
5
|
## 0.2.0 (2022-05-11)
|
2
6
|
|
3
|
-
* Add support for Sequel models
|
7
|
+
* Add support for Sequel models (@janko)
|
4
8
|
|
5
|
-
* Delete associated authentication audit logs after destroying account
|
9
|
+
* Delete associated authentication audit logs after destroying account (@janko)
|
6
10
|
|
7
11
|
## 0.1.0 (2022-05-07)
|
8
12
|
|
9
|
-
* Initial release
|
13
|
+
* Initial release (@janko)
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ $ bundle add rodauth-model
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
|
13
|
+
The model mixin is built by calling `Rodauth::Model(...)` with the Rodauth auth class, and included into the account model:
|
14
14
|
|
15
15
|
```rb
|
16
16
|
require "rodauth/model" # require before enabling any authentication features
|
@@ -71,7 +71,7 @@ You can also reference the associated models directly:
|
|
71
71
|
Account::AuthenticationAuditLog.where(message: "login").group(:account_id)
|
72
72
|
```
|
73
73
|
|
74
|
-
The associated models define the inverse `
|
74
|
+
The associated models define the inverse `account` association:
|
75
75
|
|
76
76
|
```rb
|
77
77
|
Account::ActiveSessionKey.eager(:account).map(&:account)
|
@@ -79,7 +79,7 @@ Account::ActiveSessionKey.eager(:account).map(&:account)
|
|
79
79
|
|
80
80
|
### Association options
|
81
81
|
|
82
|
-
By default, all associations
|
82
|
+
By default, all associations are configured to be deleted when the associated account record is deleted. When using Active Record, you can use `:association_options` to modify global or per-association options:
|
83
83
|
|
84
84
|
```rb
|
85
85
|
# don't auto-delete associations when account model is deleted (Active Record)
|
data/lib/rodauth/model/sequel.rb
CHANGED
@@ -36,7 +36,7 @@ module Rodauth
|
|
36
36
|
attributes = { rodauth.password_hash_id_column => self.password_hash&.pk }.compact
|
37
37
|
if password_hash
|
38
38
|
attributes[rodauth.password_hash_column] = password_hash
|
39
|
-
|
39
|
+
else
|
40
40
|
attributes[:_delete] = true
|
41
41
|
end
|
42
42
|
self.password_hash_attributes = attributes
|
data/rodauth-model.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rodauth-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rodauth
|