Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

hash[:offset] in query.rb line 66

#121

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?

...

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

State: resolved
Milestone: none
Assigned to: Chris Wanstrath Chris Wanstrath

Activity

  1. Chris Wanstrath
    Chris Wanstrath
    • State changed from new to resolved

    October 16th, 2007 @ 01:36 PM

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.