loyal_acts_as_paranoid 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/acts_as_paranoid/core.rb +4 -4
  2. metadata +6 -5
@@ -39,11 +39,11 @@ module ActsAsParanoid
39
39
 
40
40
  def paranoid_default_scope_sql
41
41
  if string_type_with_deleted_value?
42
- self.scoped.table[paranoid_column].eq(nil).
43
- or(self.scoped.table[paranoid_column].not_eq(paranoid_configuration[:deleted_value])).
42
+ self.all.table[paranoid_column].eq(nil).
43
+ or(self.all.table[paranoid_column].not_eq(paranoid_configuration[:deleted_value])).
44
44
  to_sql
45
45
  else
46
- self.scoped.table[paranoid_column].eq(nil).to_sql
46
+ self.all.table[paranoid_column].eq(nil).to_sql
47
47
  end
48
48
  end
49
49
 
@@ -74,7 +74,7 @@ module ActsAsParanoid
74
74
  protected
75
75
 
76
76
  def without_paranoid_default_scope
77
- scope = self.scoped.with_default_scope
77
+ scope = self.all.with_default_scope
78
78
  scope.where_values.delete(paranoid_default_scope_sql)
79
79
 
80
80
  scope
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loyal_acts_as_paranoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-06-26 00:00:00.000000000 Z
14
+ date: 2013-06-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activerecord
@@ -37,11 +37,11 @@ executables: []
37
37
  extensions: []
38
38
  extra_rdoc_files: []
39
39
  files:
40
- - lib/acts_as_paranoid/associations.rb
41
- - lib/acts_as_paranoid/validations.rb
40
+ - lib/acts_as_paranoid.rb
42
41
  - lib/acts_as_paranoid/relation.rb
43
42
  - lib/acts_as_paranoid/core.rb
44
- - lib/acts_as_paranoid.rb
43
+ - lib/acts_as_paranoid/associations.rb
44
+ - lib/acts_as_paranoid/validations.rb
45
45
  - LICENSE
46
46
  - README.markdown
47
47
  homepage: https://github.com/blogsoso/acts_as_paranoid
@@ -70,3 +70,4 @@ specification_version: 3
70
70
  summary: Active Record (~>3.2) plugin which allows you to hide and restore records
71
71
  without actually deleting them.
72
72
  test_files: []
73
+ has_rdoc: