in_place_relation 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.hgignore +1 -0
- data/lib/in_place_relation.rb +4 -1
- data/lib/in_place_relation/version.rb +1 -1
- metadata +17 -7
data/.hgignore
CHANGED
data/lib/in_place_relation.rb
CHANGED
@@ -23,7 +23,10 @@ module InPlaceRelation
|
|
23
23
|
# Wrapped ActiveRecord::Relation object
|
24
24
|
attr_reader :relation
|
25
25
|
|
26
|
-
|
26
|
+
# ASSOCIATION_METHODS was removed in Rails 4, its contents put into the
|
27
|
+
# other constants
|
28
|
+
METHODS_TO_WRAP = (ActiveRecord::Relation.const_defined?( :ASSOCIATION_METHODS ) ? ActiveRecord::Relation::ASSOCIATION_METHODS : []) + ActiveRecord::Relation::MULTI_VALUE_METHODS + ActiveRecord::Relation::SINGLE_VALUE_METHODS + [:merge]
|
29
|
+
|
27
30
|
|
28
31
|
METHODS_TO_WRAP.uniq.each do |meth|
|
29
32
|
define_method( meth ) do |*args, &block|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: in_place_relation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-12-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord-nulldb-adapter
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: activerecord
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,7 +37,12 @@ dependencies:
|
|
32
37
|
version: '3'
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '3'
|
36
46
|
description: ActiveRecord::Relation wrapper that can be modified/combined in place
|
37
47
|
email:
|
38
48
|
- marek@janukowicz.net
|
@@ -68,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
78
|
version: '0'
|
69
79
|
requirements: []
|
70
80
|
rubyforge_project:
|
71
|
-
rubygems_version: 1.8.
|
81
|
+
rubygems_version: 1.8.25
|
72
82
|
signing_key:
|
73
83
|
specification_version: 3
|
74
84
|
summary: A relation that can be changed in place
|