db-charmer 1.3.3 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.3
1
+ 1.3.4
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{db-charmer}
8
- s.version = "1.3.3"
8
+ s.version = "1.3.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alexey Kovyrin"]
@@ -1,8 +1,9 @@
1
1
  module DbCharmer
2
2
  module AssociationProxy
3
3
  module InstanceMethods
4
- def on_db(con, &block)
5
- @reflection.klass.on_db(con, self, &block)
4
+ def on_db(con, proxy_target = nil, &block)
5
+ proxy_target ||= self
6
+ @reflection.klass.on_db(con, proxy_target, &block)
6
7
  end
7
8
 
8
9
  def on_slave(con = nil, &block)
@@ -1,7 +1,8 @@
1
1
  module DbCharmer
2
2
  module ScopeProxy
3
3
  module InstanceMethods
4
- def on_db(con, &block)
4
+ def on_db(con, proxy_target = nil, &block)
5
+ proxy_target ||= self
5
6
  proxy_scope.on_db(con, self, &block)
6
7
  end
7
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db-charmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Kovyrin