serialization_scopes 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/serialization_scopes.rb +9 -0
  3. metadata +13 -13
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.3.0
@@ -40,6 +40,15 @@ module SerializationScopes
40
40
  super self.class.scoped_serialization_options(options)
41
41
  end
42
42
 
43
+ private
44
+
45
+ # Propagate scope to includes
46
+ def serializable_add_includes(options = {}) #:nodoc:
47
+ super do |association, records, opts|
48
+ yield association, records, opts.merge(:scope => options[:scope])
49
+ end
50
+ end
51
+
43
52
  end
44
53
  end
45
54
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serialization_scopes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2012-03-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
17
- requirement: &20248520 !ruby/object:Gem::Requirement
17
+ requirement: &21817520 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 3.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *20248520
25
+ version_requirements: *21817520
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: activerecord
28
- requirement: &20247060 !ruby/object:Gem::Requirement
28
+ requirement: &21816720 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 3.0.0
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *20247060
36
+ version_requirements: *21816720
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: activeresource
39
- requirement: &20246100 !ruby/object:Gem::Requirement
39
+ requirement: &21815840 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 3.0.0
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *20246100
47
+ version_requirements: *21815840
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- requirement: &20245100 !ruby/object:Gem::Requirement
50
+ requirement: &21815240 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *20245100
58
+ version_requirements: *21815240
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: rake
61
- requirement: &20243940 !ruby/object:Gem::Requirement
61
+ requirement: &21814740 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *20243940
69
+ version_requirements: *21814740
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: sqlite3-ruby
72
- requirement: &20243500 !ruby/object:Gem::Requirement
72
+ requirement: &21814280 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,7 +77,7 @@ dependencies:
77
77
  version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *20243500
80
+ version_requirements: *21814280
81
81
  description: Adds named scopes for ActiveRecord/ActiveResource serialization methods
82
82
  (to_xml, to_json)
83
83
  email: info@blacksquaremedia.com