Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/rails3_bridge.rb
Class Method Summary collapse
- .group(arg) ⇒ Object
- .having(arg) ⇒ Object
- .includes(*args) ⇒ Object
- .joins(*args) ⇒ Object
- .limit(arg) ⇒ Object
- .named_scope(name, options = {}, &block) ⇒ Object
- .offset(arg) ⇒ Object
- .order(arg) ⇒ Object
- .select(arg) ⇒ Object
- .where(*args) ⇒ Object
Class Method Details
.group(arg) ⇒ Object
31 32 33 |
# File 'lib/rails3_bridge.rb', line 31 def self.group(arg) self.scoped :group => arg end |
.having(arg) ⇒ Object
35 36 37 |
# File 'lib/rails3_bridge.rb', line 35 def self.having(arg) self.scoped :having => arg end |
.includes(*args) ⇒ Object
11 12 13 |
# File 'lib/rails3_bridge.rb', line 11 def self.includes(*args) self.scoped :include => args.length == 1 ? args[0] : args end |
.joins(*args) ⇒ Object
7 8 9 |
# File 'lib/rails3_bridge.rb', line 7 def self.joins(*args) self.scoped :joins => args.length == 1 ? args[0] : args end |
.limit(arg) ⇒ Object
23 24 25 |
# File 'lib/rails3_bridge.rb', line 23 def self.limit(arg) self.scoped :limit => arg end |
.named_scope(name, options = {}, &block) ⇒ Object
39 40 41 42 |
# File 'lib/rails3_bridge.rb', line 39 def self.named_scope(name, ={}, &block) = . if .respond_to?(:proxy_options) super(name, , &block) end |
.offset(arg) ⇒ Object
27 28 29 |
# File 'lib/rails3_bridge.rb', line 27 def self.offset(arg) self.scoped :offset => arg end |
.order(arg) ⇒ Object
19 20 21 |
# File 'lib/rails3_bridge.rb', line 19 def self.order(arg) self.scoped :order => arg end |
.select(arg) ⇒ Object
15 16 17 |
# File 'lib/rails3_bridge.rb', line 15 def self.select(arg) self.scoped :select => arg end |
.where(*args) ⇒ Object
3 4 5 |
# File 'lib/rails3_bridge.rb', line 3 def self.where(*args) self.scoped :conditions => args.length == 1 ? args[0] : args end |