invisible_record 0.1.4 → 0.1.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
  SHA256:
3
- metadata.gz: 9f5db2bde56e730c9c64aa275b9b030ebcb00f9f1e583afe6ef1e9317103b2b1
4
- data.tar.gz: 694f735be7c384ca3504288beebe01b6aecf08678cc72594ec69a480e6ce927e
3
+ metadata.gz: e72f11da44f9f26a2bdb59d3ad4c141a03213c4879283ddb77fa16e0601ada23
4
+ data.tar.gz: b13ded4cf1304d6fc467c809cf1bc26a5ea3aa5b54e73214253178d26fbec4aa
5
5
  SHA512:
6
- metadata.gz: 07f78f41b74c6069e6f8a458fe5480ba62a4d76d223d4ae94223fe1e6c1b668b0be29c63152343dbedffbb06c9ee46f0dd4c7559cebf720bd26727af18083a57
7
- data.tar.gz: d591bda2f62e19cc39d42d828c0d7ea2fa6d4905502f32f46aadf8d92d8b80a3d647a994dad6cf88a4458e0cbd42d5dd8bc06af13a37a4f1bdc4d734d7107130
6
+ metadata.gz: b9badeaeb8d1ebb13053bc4112735e8d4f749bc87f248c508a437df2ecc42b387590c933bed268231b289458785932efbc1bc4ec75d2e7580431ef85c19a5e37
7
+ data.tar.gz: dc93e16661ad86b4191b4a237d51dfd581bf50fe050963b301324282373887048180089424eb8b32eb6b364bf18874ab4a15b30ea3ed8c31efb34c5d739a7764
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- invisible_record (0.1.4)
4
+ invisible_record (0.1.5)
5
5
  activemodel (>= 5)
6
6
  activerecord (>= 5)
7
7
 
@@ -32,7 +32,10 @@ module InvisibleRecord
32
32
  def self.define_hidden_attributes(klass, deleted_ts_attr:)
33
33
  klass.attribute_names.each do |attribute|
34
34
  klass.define_method attribute do |*_args|
35
- return attributes[deleted_ts_attr] if attribute == deleted_ts_attr
35
+ protected_attributes = ["id", deleted_ts_attr]
36
+ protected_attributes.each do |protected_attr_name|
37
+ return attributes[protected_attr_name] if attribute == protected_attr_name
38
+ end
36
39
 
37
40
  if attributes[deleted_ts_attr].present?
38
41
  nil
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InvisibleRecord
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invisible_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Rejón