activerecord-be_readonly 0.1.0 → 0.2.0
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/README.md +9 -3
- data/lib/activerecord-be_readonly/config.rb +2 -0
- data/lib/activerecord-be_readonly/model.rb +1 -1
- data/lib/activerecord-be_readonly/version.rb +1 -1
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed4c428fad39b95f257a878fc37f82e6a52b30e7
|
4
|
+
data.tar.gz: 0feda1824be051213a474d3fe73991337c39d49c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93854ae9a962220cb2bd9a9ba4286b92f91eddfaccf9e4857e4944eb52d6bbab3f70216da65e56fce896713533db135bd1ee8ed7aa46f8c2d7e79eb28467640a
|
7
|
+
data.tar.gz: ec55651678ae50f371838aab3b1c9b7fbe99e1844c621419601e79c4970c7a9f8486c0b756ae54cc1a401c0eff8620f7d70b8c1ff73ee7b362c29d2595c9a061
|
data/README.md
CHANGED
@@ -41,10 +41,15 @@ Or if you are off-rails, but use ActiveRecord, just do this in the model class:
|
|
41
41
|
|
42
42
|
### Configuration
|
43
43
|
|
44
|
-
|
44
|
+
You can create an initializer (`/config/initializers/activerecord-be_readonly.rb`) with the following options:
|
45
45
|
|
46
|
-
|
47
|
-
|
46
|
+
To turn off read-only application-wide, set the enabled setting to false (useful if you'd like to turn off read-only only for tests, etc.)
|
47
|
+
|
48
|
+
BeReadonly.enabled = false # Default: true
|
49
|
+
|
50
|
+
To disable read-only for record creation application-wide, set the create_allowed setting to true
|
51
|
+
|
52
|
+
BeReadonly.create_allowed = true # Default: false
|
48
53
|
|
49
54
|
### Contributors
|
50
55
|
|
@@ -52,6 +57,7 @@ Thanks to:
|
|
52
57
|
* [vkhater](https://github.com/vkhater)
|
53
58
|
* [Gabriel Naiman](https://github.com/gabynaiman)
|
54
59
|
* [Gary Weaver](https://github.com/garysweaver)
|
60
|
+
* [Kevin Zych](https://github.com/kayzee)
|
55
61
|
|
56
62
|
### License
|
57
63
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-be_readonly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary S. Weaver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,14 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '3.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
29
|
+
version: '3.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '5'
|
27
33
|
description: Makes read-only models easier to implement in ActiveRecord 3.x/4.x.
|
28
34
|
email:
|
29
35
|
- garysweaver@gmail.com
|