active_form_objects 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dsl/relations.rb +6 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca5f16d13a98051602acf2df9d62f65d0928f3c2ca6106138ead07acc8662c6f
4
- data.tar.gz: 8fcbdf3e85e608f0558baa4d6ecc3497b3025a187045cb8ef7ab4ce1b3f8f16d
3
+ metadata.gz: e99d26a7f22a07026033f6bb80606ef503aee1449010469f8652d9b10bd62812
4
+ data.tar.gz: 0f7fd36f0be826e6ffcdf8a1b45a54018ab83b1f9aebcb3ff723bb9d21fdd5f4
5
5
  SHA512:
6
- metadata.gz: da7a647ffd6216ac8b8cd804e520a36190083ff938ee70f3c2ecafd9ffab1d9ec961913d22a45b5dc6658358e970b14f8c99658b531b672c4ea9aec02543e937
7
- data.tar.gz: fb251b0ae7067aa8c8c7636acf824a54fa48b51590c7c4793c1dff7eb97ab9d48e5e44347964a01634f72097dccff53c423782438f8d7c7b212da15b269ee98a
6
+ metadata.gz: ec428c4fccec9acd974d5af6cbbb6e4dcd99f26eae2f32260e73d27e8446abef87c835f4fcae31ef25825421ef26f7ec7de272bd36bc428f086165ce97082cf9
7
+ data.tar.gz: c5423033eb5dc15c6315efeb1d04cf3d14827d76710969e20133de6669fe598237c7d1af61823cf97d931d89d094bcc3a9a285dc130e838982208e0babebe86a
@@ -26,7 +26,12 @@ module Dsl
26
26
  # relations(:entity, :user)
27
27
  #
28
28
  def relations(*params)
29
- validates(*params, relation: true)
29
+ options = {}
30
+ if params.last.is_a?(Hash)
31
+ options = params.last
32
+ params.pop
33
+ end
34
+ validates(*params, relation: true) unless options[:skip_validations]
30
35
 
31
36
  params.each do |param|
32
37
  relation_key = "#{param}_id".to_sym
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_form_objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michaël Villeneuve