coded_options 0.1.6 → 0.1.7
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.
- data/README.md +7 -1
- data/lib/coded_options/version.rb +1 -1
- data/lib/rails/coded_options.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
|
@@ -13,7 +13,7 @@ into
|
|
|
13
13
|
|
|
14
14
|
STATES = %w(initial active closed)
|
|
15
15
|
STATE_OPTIONS = [["initial", 0], ["active", 1], ["closed", 2]]
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
def state
|
|
18
18
|
return unless state_id
|
|
19
19
|
STATES[state_id]
|
|
@@ -34,6 +34,12 @@ a plain Ruby object as follows:
|
|
|
34
34
|
foo.type_id = 1
|
|
35
35
|
foo.type #=> awesome
|
|
36
36
|
|
|
37
|
+
If you want to use this with MongoDB, just add
|
|
38
|
+
|
|
39
|
+
extend CodedOptions
|
|
40
|
+
|
|
41
|
+
to your model.
|
|
42
|
+
|
|
37
43
|
Installation
|
|
38
44
|
------------
|
|
39
45
|
|
data/lib/rails/coded_options.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: coded_options
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 21
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 7
|
|
10
|
+
version: 0.1.7
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Jason Dew
|