fixably 0.4.0 → 0.5.0

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
  SHA256:
3
- metadata.gz: 00264c3855666a83f00954b1dd910b9f792d1a3a119414be7f426350b955197e
4
- data.tar.gz: 61437237b7ba9632ef03cd623bd391517b24dfc50defeeef1af44ae1d3c0f350
3
+ metadata.gz: a9d5277a0ba5d3af5ae44a46535773a0d37abced3961e2dec3b43b04fe7d31e3
4
+ data.tar.gz: e3fd8a7cfa9ce0ac0702301bacce2423e8654970afab2cdf4aeeb6f3629a009a
5
5
  SHA512:
6
- metadata.gz: d612e5dfec11c7c4176cc268084bb69155897f60e35384250acf634a99ee75633a8543b64e19204648f178b853f2f50ce83d543e7d16e65fda63c6a0a4e22516
7
- data.tar.gz: 7464433ad672549066cfc94450417abd149c66c0c7bd851f488425911c57aba35daac11a497991c9a8e86a413b761967d4d42f10a7697e76e09bb83d17c84eb1
6
+ metadata.gz: '0941d4b684ab7e4dc37a1f930207e8cd9a922779ed0371f51e07a518c594e9fc33320d917bf24bd99b968e4e9e33c83388fc06c85c4b7ebb26c7cad516296467'
7
+ data.tar.gz: 2f74f0fd34354408ada06e2a5442f75fa1dd4c83b805c021a90292414a49c617166cfd99640b9c8f3f1a07a1e57089547f2e107d0a918e227b1efee99cf0b332
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fixably (0.4.0)
4
+ fixably (0.5.0)
5
5
  activeresource (~> 5)
6
6
 
7
7
  GEM
@@ -17,14 +17,14 @@ module Fixably
17
17
 
18
18
  def remove_on_encode = %w[created_at href id]
19
19
 
20
- private
21
-
22
20
  def remove_has_many_associations(attrs)
23
21
  reflections.select { _2.macro.equal?(:has_many) }.keys.each do
24
22
  attrs.delete(_1)
25
23
  end
26
24
  end
27
25
 
26
+ private
27
+
28
28
  def remove_unallowed_parameters(attrs)
29
29
  remove_on_encode.each { attrs.delete(_1) }
30
30
  end
@@ -39,6 +39,15 @@ module Fixably
39
39
  allow_nil: true
40
40
  )
41
41
 
42
+ protected
43
+
44
+ def remove_has_many_associations(attrs)
45
+ reflections.select { |_, reflection| reflection.macro.equal?(:has_many) }.
46
+ keys.
47
+ reject { _1.equal?(:notes) }.
48
+ each { attrs.delete(_1) }
49
+ end
50
+
42
51
  class Contact < ApplicationResource
43
52
  schema do
44
53
  string :full_name
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fixably
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fixably
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Rice
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-15 00:00:00.000000000 Z
11
+ date: 2021-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource