rails3_bridge 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/lib/rails3_bridge.rb CHANGED
@@ -42,3 +42,45 @@ module ActiveRecord
42
42
  end
43
43
  end
44
44
  end
45
+
46
+ module ActiveRecord
47
+ module Associations
48
+ class AssociationProxy
49
+ def self.where(*args)
50
+ self.scoped :conditions => args.length == 1 ? args[0] : args
51
+ end
52
+
53
+ def self.joins(*args)
54
+ self.scoped :joins => args.length == 1 ? args[0] : args
55
+ end
56
+
57
+ def self.includes(*args)
58
+ self.scoped :include => args.length == 1 ? args[0] : args
59
+ end
60
+
61
+ def self.select(arg)
62
+ self.scoped :select => arg
63
+ end
64
+
65
+ def self.order(arg)
66
+ self.scoped :order => arg
67
+ end
68
+
69
+ def self.limit(arg)
70
+ self.scoped :limit => arg
71
+ end
72
+
73
+ def self.offset(arg)
74
+ self.scoped :offset => arg
75
+ end
76
+
77
+ def self.group(arg)
78
+ self.scoped :group => arg
79
+ end
80
+
81
+ def self.having(arg)
82
+ self.scoped :having => arg
83
+ end
84
+ end
85
+ end
86
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rails3_bridge}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Doug Youch"]
12
- s.date = %q{2011-04-07}
12
+ s.date = %q{2011-04-11}
13
13
  s.description = %q{Adds Rails 3 methods to ActiveRecord::Base.}
14
14
  s.email = %q{doug@cykod.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails3_bridge
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Doug Youch
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-07 00:00:00 -04:00
18
+ date: 2011-04-11 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency