source_ids 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d31a494ef95c40e92a2c5b44679b90f745e5958
4
- data.tar.gz: 21313bd507347ede7672cbc94aa7b88685fb96ba
3
+ metadata.gz: 09032424ae9423bdbdefb4530ecacb06b9831023
4
+ data.tar.gz: 765ea427f113ef3d3027fb1f916b984750d3499d
5
5
  SHA512:
6
- metadata.gz: f7887634128e6260d3edf646dfd87d7461e8188b835eab259fbbf5c3ca3ec3aca14900d650983c394cdf0d2810fd9722e255d6111e917d876ed0aea8ea0857f4
7
- data.tar.gz: acafedda3ba6639742f7e7bdbec984b8f754dbd355832747a3dd04dd25c2e4926dd7b8ccbb8bcced93781093fedf420a994ddb028e49cad9822a2817ac15e2f6
6
+ metadata.gz: db9174981c81c68f94008e77cf3159fa3d7e029f1cf2815a82e31bb9011e7e21cc9cd537adf5c57c1769e4dc1b74215c9eda7bf5a76d919706ce95f063101b89
7
+ data.tar.gz: 6ddbdaa7e326fd088afcc57166a32d871b946c675c09400aef798f26480c863ff68308b7f35bef77a0381114b179b073151847d40daa6b23ce1110d8e78631c7
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SourceIds
2
2
 
3
- SourceIds enables indirect association replacement via _source_ids=.
3
+ SourceIds enables indirect association replacement via \_source_ids=.
4
4
  This feature is only for has_many :through associations.
5
5
 
6
6
  ## Installation
@@ -28,16 +28,16 @@ You can use group.user_ids= to replace users and save them in Rails.
28
28
 
29
29
  But you can't just change your association objects without saving them.
30
30
 
31
- This gem make it possible with group._user_ids=.
31
+ This gem make it possible with group.\_user_ids=.
32
32
 
33
- To enable _user_ids=, add like this.
33
+ To enable \_user_ids=, add like this.
34
34
 
35
35
  accepts_source_ids_for :users
36
36
 
37
37
  This also add following methods.
38
38
 
39
- * _user_ids - returns active (not marked for destruction) records' ids.
40
- * _users - return source records via relation objects (relation objects may be changed but not saved yet).
39
+ * \_user_ids - returns active (not marked for destruction) records' ids.
40
+ * \_users - return source records via relation objects (relation objects may be changed but not saved yet).
41
41
 
42
42
  ## Contributing
43
43
 
@@ -1,3 +1,3 @@
1
1
  module SourceIds
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/source_ids.rb CHANGED
@@ -31,7 +31,7 @@ module SourceIds
31
31
  end
32
32
  end
33
33
 
34
- send(relation.name).target.sort do |a, b|
34
+ send(relation.name).target.sort! do |a, b|
35
35
  if a.marked_for_destruction? && b.marked_for_destruction?
36
36
  0
37
37
  elsif a.marked_for_destruction?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: source_ids
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - nay3
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-08 00:00:00.000000000 Z
11
+ date: 2013-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler