single_record_interface 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -10
- data/lib/single_record_interface.rb +1 -1
- data/lib/single_record_interface/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f1a03b720845857c148e40b41aa3ddf53edb529
|
4
|
+
data.tar.gz: 859c8762e6015630a914b3462df03691302c01be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 622ca36c85c8963464db0d5165d2f790ee49a7224d469b629684aef7b6eec0796874d9aed97c5226c9ff89f5251672e08d7c0edd035dbba065144b7acbbbda38
|
7
|
+
data.tar.gz: 2b8038f94e3d1b67c65ae5e487d8908e6af7948317ac0e226287c25aaba04e21da19cffd902bd3ab02f1d6fa5786bc3f30b31e2f22f1e4bfc9862e1d340e5e39
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# SingleRecordInterface
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Concern for models which should have only one record.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,20 +20,23 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
```ruby
|
24
|
+
class Settings < ActiveRecord::Base
|
25
|
+
include SingleRecordInterface
|
26
|
+
end
|
28
27
|
|
29
|
-
|
28
|
+
Settings.create(site_name: "My site")
|
29
|
+
#=> <Settings site_name: "My site" ... >
|
30
30
|
|
31
|
-
|
31
|
+
Settings.site_name
|
32
|
+
#=> "My site"
|
33
|
+
```
|
32
34
|
|
33
35
|
## Contributing
|
34
36
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
37
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/droptheplot/single_record_interface. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
36
38
|
|
37
39
|
|
38
40
|
## License
|
39
41
|
|
40
42
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: single_record_interface
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Novikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|