You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running will_paginate 3.0.pre2 on rails 3.0.7, and there seems to be some type of strange bug where a EagerLoadPolymorphicError is being raised whenever almost any conditions are used.
My 2 relevant models are very simple:
class Book
boolean public
belongs_to :author, :polymorphic => true
end
class Individual
has_many :books, :as => :author
end
class Group
has_many :books, :as => :author
end
This query will raise the exception:
Book.where(:public => true).includes(:author).paginate(:page => @page, :per_page => page_size, :order => "id DESC")
I have tried modifying the condition in a number of ways, and the only way that makes it not throw an exception is if the condition is on the id column, oddly enough.
The text was updated successfully, but these errors were encountered:
I am running will_paginate 3.0.pre2 on rails 3.0.7, and there seems to be some type of strange bug where a EagerLoadPolymorphicError is being raised whenever almost any conditions are used.
My 2 relevant models are very simple:
class Book
boolean public
belongs_to :author, :polymorphic => true
end
class Individual
has_many :books, :as => :author
end
class Group
has_many :books, :as => :author
end
This query will raise the exception:
Book.where(:public => true).includes(:author).paginate(:page => @page, :per_page => page_size, :order => "id DESC")
I have tried modifying the condition in a number of ways, and the only way that makes it not throw an exception is if the condition is on the id column, oddly enough.
The text was updated successfully, but these errors were encountered: