platanus 0.0.4 → 0.0.5

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.
@@ -36,6 +36,12 @@ module Platanus
36
36
  def after_remove(_callback)
37
37
  self.set_callback :remove, :after, _callback
38
38
  end
39
+
40
+ ## Disables default scopes and creates an additional 'active' scope
41
+ def explicit_scopes(_active_scope_name='active')
42
+ self.send(:default_scope, nil)
43
+ self.send(:scope, _active_scope_name, self.where(:removed_at => nil))
44
+ end
39
45
  end
40
46
 
41
47
  # Returns true if object hasnt been removed.
@@ -1,3 +1,3 @@
1
1
  module Platanus
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: platanus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-20 00:00:00.000000000 Z
12
+ date: 2012-07-25 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Platan.us utility gem
15
15
  email: