paranoia 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -6,7 +6,13 @@ You would use either plugin / gem if you wished that when you called `destroy` o
6
6
 
7
7
  ## Installation & Usage
8
8
 
9
- ### Initial installation
9
+ Put this in your Gemfile:
10
+
11
+ gem 'paranoia'
12
+
13
+ Then run `bundle`. Done.
14
+
15
+ Updating is as simple as `bundle update paranoia`.
10
16
 
11
17
  #### Rails 3
12
18
 
@@ -10,6 +10,7 @@ module Paranoia
10
10
  def destroy
11
11
  _run_destroy_callbacks
12
12
  self.update_attribute(:deleted_at, Time.now) if !deleted? && persisted?
13
+ freeze
13
14
  end
14
15
  alias :delete :destroy
15
16
 
@@ -1,3 +1,3 @@
1
1
  module Paranoia
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -37,6 +37,7 @@ class ParanoiaTest < Test::Unit::TestCase
37
37
  model.delete
38
38
 
39
39
  assert_equal true, model.deleted_at.nil?
40
+ assert model.frozen?
40
41
 
41
42
  assert_equal 0, model.class.count
42
43
  assert_equal 0, model.class.unscoped.count
@@ -50,6 +51,7 @@ class ParanoiaTest < Test::Unit::TestCase
50
51
  model.delete
51
52
 
52
53
  assert_equal false, model.deleted_at.nil?
54
+ assert model.frozen?
53
55
 
54
56
  assert_equal 0, model.class.count
55
57
  assert_equal 1, model.class.unscoped.count
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: paranoia
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.2
5
+ version: 1.0.3
6
6
  platform: ruby
7
7
  authors: []
8
8
 
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-25 00:00:00 +10:00
13
+ date: 2011-05-26 00:00:00 +10:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency