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
Last? should return true!
Daniel Rice16 Aug 2011, 4:13pm
ActiveRecord::Relation can find the maximum and minimum values using database functions to find it.
So the first? and last? equality checks check the position column against acts_as_list_class.scope_conditions.maximum(
Looks like the first? method will work just fine. Its the last? method that needs to get updated. I will fork the acts_as_list plugin and bring it under highgroove's wing, fix it, and update Star's dependencies accordingly.
This looks like a bug in the acts_as_list plugin when detecting whether its the last record in a set.
Last? should return true!
Daniel Rice16 Aug 2011, 4:13pm
ActiveRecord::Relation can find the maximum and minimum values using database functions to find it.
Requirement.find(83077).requirement_category.requirements.maximum(:position)
=> 3
So the first? and last? equality checks check the position column against acts_as_list_class.scope_conditions.maximum(
Looks like the first? method will work just fine. Its the last? method that needs to get updated. I will fork the acts_as_list plugin and bring it under highgroove's wing, fix it, and update Star's dependencies accordingly.
https://www.pivotaltracker.com/story/show/17086285
The text was updated successfully, but these errors were encountered: