rails_model_stacker 0.0.4 → 0.0.5

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: 9dc6182223668bdf8786a5d41d3a9ee42e9a52d4
4
- data.tar.gz: 86f75be0d2feae1a80e35e9801dce623fde439d8
3
+ metadata.gz: 9f7925110cd320c9740ee5ceef3e817e67714ece
4
+ data.tar.gz: 6d02b423334cff8c373de3f030f2dc509ad867e1
5
5
  SHA512:
6
- metadata.gz: fd93d2050b17d461c4b31c9cec17e3f201dc77517d6eaf7b4a7f6157e098dbb9194b23a61200a432a9b79836f63aedfd37c5522db7225ee380e73b68702d4599
7
- data.tar.gz: 976206a92981b146c8fd43addf4cbd9ba4cd44244e7acb14979444678ac707cae40ce7592209ef580f69d64e207442013d3f7ff6d27b5f14b5378f41dcf0332c
6
+ metadata.gz: 4a4e1fb39d9f8658b6c7fc649ab34f5fa791906dba8ecb5d4fcea2243d82e754623166bc12ccb8bce186c3a5bca3b39f3e83548759384aaf7363a526de1b6dc4
7
+ data.tar.gz: ba8cd003b51d1d662253647d73550ffefaf156d612d4fbcd5a29c0a0c8ce4ed706104b06b41f4e9d0f8d348760b9020887ed95d350810d0b5aad1bf0b80b4507
@@ -45,6 +45,12 @@ module RailsModelStacker
45
45
  declare_trait_for attributes, :has_many
46
46
  end
47
47
 
48
+ ##
49
+ #see declare_join_on
50
+ def declare_nested attributes
51
+ declare_trait_for attributes, :accepts_nested_attributes_for
52
+ end
53
+
48
54
  end
49
55
  end
50
56
 
@@ -49,4 +49,10 @@ module SpecStacker
49
49
  should_all attributes, :have_many
50
50
  end
51
51
 
52
+ ##
53
+ #test for nested attributes
54
+ #+attributes+:: array of symbols of attributes
55
+ def should_all_nest attributes
56
+ should_all attributes, :accept_nested_attributes_for
57
+ end
52
58
  end
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "rails_model_stacker"
6
- s.version = "0.0.4"
6
+ s.version = "0.0.5"
7
7
  s.date = "2017-07-13"
8
8
  s.summary = "Rails Model Stacker"
9
9
  s.description = "Shorter Active Record validations and associations with RSpec and shoulda support"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_model_stacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Petricone