activerecord-immutable 0.0.2 → 0.0.3

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: 97476c3b5c4d60b9230bfe4ede812bebd84a2214
4
- data.tar.gz: 61f7fe7af3c246fdc529bf45a703686ff4c79bb7
3
+ metadata.gz: 1d66992cb711820589db9e14c2c4ec392aaa076f
4
+ data.tar.gz: 317c945d0874afa81e08245b57d2a6f2e0a5760e
5
5
  SHA512:
6
- metadata.gz: 45fd96c5e91ef9c9e33fb12c1b947874da28eb394446b4ab0aab2ccfccb1f5e9edc3181608f65720c45dd585aa1764b4e8fadedcef1b7bc1ca88fbaa28942181
7
- data.tar.gz: aaef4a88606b87cf008b327fbc3b798df42d875db21362e5ac4550ba33fc57d980ccd82b2e4541dce02a8f3397c47f696de39c8a80330dab01ada9f54b18205e
6
+ metadata.gz: 5979f043248bd2dd051c50371f1a115e95e76b950616e6227407e3cf0e9842a0fe35a97814a8f006b43316fb10964237c92879440b3ac63a06ac078a36e76007
7
+ data.tar.gz: 827e9ab0f987409685854e3f3cdae3ff42d44202435db9a89a2a001bd0f3d94c089c668aaed357552d4c9ac3aa0c6d060b4aa1ebbef90ec2bda6d72f6b0a5a2a
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Activerecord::Immutable
1
+ # ActiveRecord::Immutable
2
2
 
3
3
  A tiny mixin to make your ActiveRecord models immutable after creation.
4
4
 
@@ -3,7 +3,7 @@ require "active_record/immutable/version"
3
3
  module ActiveRecord
4
4
  module Immutable
5
5
  def self.included(model)
6
- model.before_destroy :raise_error
6
+ model.before_destroy :raise_error if model.respond_to?(:before_destroy)
7
7
  end
8
8
 
9
9
  def readonly?
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Immutable
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-immutable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Rohrer