#121 ✓resolved
erwin

hash[:offset] in query.rb line 66

Reported by erwin | October 16th, 2007 @ 01:34 PM

found a bug in lib/query.rb line 66 OFFSET #{hash[:limit] should be written OFFSET #{hash[:offset] to allow

query_context.to_sql

=> "SELECT * FROM ratings JOIN user WHERE (ratings.`user_id` = 25 AND users.activated) LIMIT 5 OFFSET 0"

query.rb

....

def to_s

...

sql << "JOIN #{hash[:includes].join(', ')}" unless hash[:includes].blank?

sql << "WHERE #{hash[:conditions].join(' AND ')}" unless hash[:conditions].blank?

sql << "ORDER BY #{hash[:order].join(', ')}" unless hash[:order].blank?

sql << "LIMIT #{hash[:limit]}" unless hash[:limit].blank?

#sql << "OFFSET #{hash[:limit]}" unless hash[:offset].blank?

sql << "OFFSET #{hash[:offset]}" unless hash[:offset].blank?

...

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Tags

Pages