simple_enum-multiple 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e64dd2066420ee9485389b723657a43d19dc63d3
|
4
|
+
data.tar.gz: bc4edba3937b312b87a5a5e1bc0319cff47e074d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5e2aae9da2ba6475eb7e5c2602947a3de60e0959e2ce038212545e488e3fdf7aac24c22d080e62f9bf996fbece24fba3c0f583a93383e3b0c370a9d1c179cfe
|
7
|
+
data.tar.gz: eb72c6faa85549c7d9f01e297e577ba2b5d8eb45b4e4f19607973bb3b5acfa4c0a497b9a2beb1874e3d5ca3da7b14337881af728ca2130985963ac936ad6ae7a
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ end
|
|
16
16
|
|
17
17
|
Then create the required `users_favorites` table using migrations:
|
18
18
|
```ruby
|
19
|
-
class
|
19
|
+
class AddFavoritesColumnToUser < ActiveRecord::Migration
|
20
20
|
def change
|
21
21
|
create_join_table :users, :favorites
|
22
22
|
end
|
@@ -46,7 +46,7 @@ module SimpleEnum
|
|
46
46
|
define_method :"update_#{source}!" do
|
47
47
|
return unless send(:"#{source}_changed?")
|
48
48
|
original_cds = send(:"#{source}_was")
|
49
|
-
current_cds = send(source)
|
49
|
+
current_cds = send(source).select(&:present?)
|
50
50
|
|
51
51
|
# if any enum been removed
|
52
52
|
if (original_cds - current_cds).any?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_enum-multiple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Theo Li
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simple_enum
|