active_type 0.3.0 → 0.3.1

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: 614f88d296a3773a1c03c6a3dad9473e345dcfd5
4
- data.tar.gz: cccb5d3fb673acdde82a14c9b7156dfd5623587a
3
+ metadata.gz: d34e93d8bb376b7afcf631c41e4656b34346488e
4
+ data.tar.gz: 4cfe64618490965f0c4bc1a4dcf6771aca4e6ed8
5
5
  SHA512:
6
- metadata.gz: 055145ac7031800c9a64ccb5b60dd16712eb02d2e0fac0fb5f4c5fbb3131188329b280482e76849d77abb6a78fd8a5dfa5e0bf0328908e125321e779dec4a68f
7
- data.tar.gz: 0232544fbd3b0d789bfd272ebc28faf08b2327c1f452dca80aab8ba4fe27629d796efc4e3de0393411964d4b87b1aeb44b860e30f939018348f19d6390b63628
6
+ metadata.gz: 85a874cbe804ed0b878d03f085bbaf81a48de22ee94425d4dbc7e01d0d118bbd6affd9f9f39ab4108eb1f25ab980f043e4f7eb0ba348b248b5abc567a5d0c3ea
7
+ data.tar.gz: b43cc5c7ae0382efc4c9c4de62c68d10078f486d8596f7fc2709ff5eb938536f18a8f4519c7a884028d49ad9671866e6668389ddc71c3c277f8ea30e10b76ded
data/README.md CHANGED
@@ -213,7 +213,7 @@ end
213
213
  }
214
214
  ```
215
215
 
216
- To use it with single records, use `nests_one`. It works like `accept_nested_attributes` does for `has_one`.
216
+ To use it with single records, use `nests_one`. It works like `accept_nested_attributes` does for `has_one`. Use `.record_attributes =` to build the child record.
217
217
 
218
218
  Supported options for `nests_many` / `nests_one` are:
219
219
  - `build_scope`
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- active_type (0.3.0)
4
+ active_type (0.3.1)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- active_type (0.3.0)
4
+ active_type (0.3.1)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- active_type (0.3.0)
4
+ active_type (0.3.1)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- active_type (0.3.0)
4
+ active_type (0.3.1)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -13,6 +13,7 @@ module ActiveType
13
13
  Class.new(base) do
14
14
 
15
15
  include VirtualAttributes
16
+ include NestedAttributes
16
17
  include Inheritance
17
18
 
18
19
  self.extended_record_base_class = base
@@ -1,3 +1,3 @@
1
1
  module ActiveType
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -680,3 +680,21 @@ describe "ActiveType::Object" do
680
680
  end
681
681
 
682
682
  end
683
+
684
+ describe "ActiveType::Record" do
685
+
686
+ it 'supports nested attributes' do
687
+ ActiveType::Record.should respond_to(:nests_one)
688
+ ActiveType::Record.should respond_to(:nests_many)
689
+ end
690
+
691
+ end
692
+
693
+ describe "ActiveType::Record" do
694
+
695
+ it 'supports nested attributes' do
696
+ ActiveType::Record[NestedAttributesSpec::Record].should respond_to(:nests_one)
697
+ ActiveType::Record[NestedAttributesSpec::Record].should respond_to(:nests_many)
698
+ end
699
+
700
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_type
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Kraze
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-23 00:00:00.000000000 Z
12
+ date: 2014-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler