activeentity 0.0.1.beta10 → 0.0.1.beta11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_entity/gem_version.rb +1 -1
- data/lib/active_entity/readonly_attributes.rb +10 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef9f2d15e9d46446eec6df325deecae4257adef9d9cb567622149d33a6170889
|
4
|
+
data.tar.gz: b0d58e15e22fe09823c49f9482696e24ca6c14a91f0509dae7fe2d46a698958f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c2b95920c3a3e7d15f99048bce6be95e3431b870832cfe55c1e45261371099615b2c0f6f22cfc3588dfbebca3b1baf914a28deb811536c5f154346d48b455ad
|
7
|
+
data.tar.gz: d726d5dea141881c816222402deb34b6af0ab38f34b3c492d08b85c32d06dad52c7f604af6e709b716fd95bf6da67d4c4279d7acb92a43a4e797184dee095852
|
@@ -8,28 +8,28 @@ module ActiveEntity
|
|
8
8
|
class_attribute :_attr_readonly, instance_accessor: false, default: []
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
12
|
-
@
|
11
|
+
def disable_attr_readonly!
|
12
|
+
@_attr_readonly_enabled = false
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
16
|
-
@
|
15
|
+
def enable_attr_readonly!
|
16
|
+
@_attr_readonly_enabled = true
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
19
|
+
def enable_attr_readonly
|
20
20
|
return unless block_given?
|
21
21
|
|
22
|
-
|
22
|
+
disable_attr_readonly!
|
23
23
|
yield self
|
24
|
-
|
24
|
+
enable_attr_readonly!
|
25
25
|
|
26
26
|
self
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
30
|
-
@
|
29
|
+
def _attr_readonly_enabled
|
30
|
+
@_attr_readonly_enabled
|
31
31
|
end
|
32
|
-
alias
|
32
|
+
alias attr_readonly_enabled? _attr_readonly_enabled
|
33
33
|
|
34
34
|
module ClassMethods
|
35
35
|
# Attributes listed as readonly will be used to create a new record but update operations will
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeentity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.
|
4
|
+
version: 0.0.1.beta11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jasl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: 1.3.1
|
155
155
|
requirements: []
|
156
|
-
rubygems_version: 3.0.
|
156
|
+
rubygems_version: 3.0.4
|
157
157
|
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: Rails virtual model solution based on ActiveModel.
|