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: 5cfb52ea823738d79c3c6d3bf2cf579f181530a8
4
- data.tar.gz: e0bc9cdcabd9e75a510c38c4e80225e13379bcf8
3
+ metadata.gz: e64dd2066420ee9485389b723657a43d19dc63d3
4
+ data.tar.gz: bc4edba3937b312b87a5a5e1bc0319cff47e074d
5
5
  SHA512:
6
- metadata.gz: ef43d185427b0c7d21245c83a3c7ed1f90532b252be11056209b3f23698f295478c5d97b7abfd9da8c9997d52ac72fad6665ef498fc7492d4d3f1008a419b26e
7
- data.tar.gz: 75eb6c0fcae7fb06b1bcfd2e92c0c9092432dd12bdb2cf97dfc015d43242f4e0de3bc49511e03219a9b1660b7ff859d590a6c64202dee0cfdaa921e1c385e33e
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 AddfavoritesColumnToUser < ActiveRecord::Migration
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?
@@ -25,7 +25,7 @@ module SimpleEnum
25
25
  end
26
26
 
27
27
  alias_method :to_a, :proxy
28
- delegate :inspect, :to_s, :==, :each, to: :proxy
28
+ delegate :inspect, :to_s, :==, :each, :join, to: :proxy
29
29
 
30
30
  end
31
31
  end
@@ -1,5 +1,5 @@
1
1
  module SimpleEnum
2
2
  module Multiple
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
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.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-09-22 00:00:00.000000000 Z
11
+ date: 2015-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_enum