aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_relation/relations/relation.rb
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-04-11 18:32:47 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-04-11 18:32:47 -0700
commita0dc6900330b7ec78785a80fe8b72595384635a0 (patch)
tree2f73c8433cecf638fd53c33e09803b1012b61759 /lib/active_relation/relations/relation.rb
parentae0fe8f6c8c41b5abf8ced6a99b19dacdf8f57eb (diff)
downloadrails-a0dc6900330b7ec78785a80fe8b72595384635a0.tar.gz
rails-a0dc6900330b7ec78785a80fe8b72595384635a0.tar.bz2
rails-a0dc6900330b7ec78785a80fe8b72595384635a0.zip
fixed bug with take/skip
Diffstat (limited to 'lib/active_relation/relations/relation.rb')
-rw-r--r--lib/active_relation/relations/relation.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/active_relation/relations/relation.rb b/lib/active_relation/relations/relation.rb
index b26fac4e85..29c6fbbed0 100644
--- a/lib/active_relation/relations/relation.rb
+++ b/lib/active_relation/relations/relation.rb
@@ -120,8 +120,8 @@ module ActiveRelation
("WHERE #{selects.collect { |s| s.to_sql(Sql::WhereClause.new(engine)) }.join("\n\tAND ")}" unless selects.blank? ),
("ORDER BY #{orders.collect { |o| o.to_sql(Sql::OrderClause.new(engine)) }.join(', ')}" unless orders.blank? ),
("GROUP BY #{groupings.collect(&:to_sql)}" unless groupings.blank? ),
- ("LIMIT #{take}" unless take.blank? ),
- ("OFFSET #{skip}" unless skip.blank? )
+ ("LIMIT #{taken}" unless taken.blank? ),
+ ("OFFSET #{skipped}" unless skipped.blank? )
].compact.join("\n"), self.alias
end
alias_method :to_s, :to_sql
@@ -159,8 +159,8 @@ module ActiveRelation
def inserts; [] end
def groupings; [] end
def joins; nil end
- def take; nil end
- def skip; nil end
+ def taken; nil end
+ def skipped; nil end
def alias; nil end
end
end \ No newline at end of file