nay-record_with_operator 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ DESCRIPTION = "Rails plugin to set created_by, updated_by, deleted_by to ActiveR
12
12
  GITHUB_PROJECT = "record_with_operator"
13
13
  HOMEPAGE = "http://github.com/nay/#{GITHUB_PROJECT}/tree"
14
14
  BIN_FILES = %w( )
15
- VER = "0.0.19"
15
+ VER = "0.0.20"
16
16
  CLEAN.include ['pkg']
17
17
 
18
18
  desc 'Default: run unit tests.'
@@ -13,10 +13,12 @@ module AssociationWithOperator
13
13
 
14
14
  def method_missing(method, *args)
15
15
  results = super
16
- if results.respond_to?(:operator=)
17
- results.operator= proxy_owner.operator
18
- elsif results.kind_of? Array
19
- results.each{|r| r.operator = proxy_owner.operator if r.respond_to?(:operator=)}
16
+ unless ActiveRecord::NamedScope::Scope === results
17
+ if results.respond_to?(:operator=)
18
+ results.operator= proxy_owner.operator
19
+ elsif results.kind_of? Array
20
+ results.each{|r| r.operator = proxy_owner.operator if r.respond_to?(:operator=)}
21
+ end
20
22
  end
21
23
  results
22
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nay-record_with_operator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasuko Ohba
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-18 00:00:00 -07:00
12
+ date: 2009-09-25 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency