Cutomizable out of range, fixes #297 #306

Closed
wants to merge 10 commits into
from

Conversation

Projects
None yet
4 participants
@gs

gs commented Nov 4, 2012

Added out_of_range functionality which allows user to set what page should
be displayed when he go out of range. Allowed settings are :blank (by
defualt), :first, :last page.

}
end
end
+
+ module ClassMethods
+ def calculate_offset(num)

This comment has been minimized.

@herrtreas

herrtreas Nov 9, 2012

Parts of this method are repeated over different classes. Maybe something to refactor and move into one dedicated place?

@herrtreas

herrtreas Nov 9, 2012

Parts of this method are repeated over different classes. Maybe something to refactor and move into one dedicated place?

@herrtreas

This comment has been minimized.

Show comment
Hide comment

👍

@incubus

This comment has been minimized.

Show comment
Hide comment

incubus commented Jan 4, 2013

+1

@yuki24

This comment has been minimized.

Show comment
Hide comment
@yuki24

yuki24 Apr 1, 2013

Member

Thank you for the PR! This out_of_rage option sounds good to me. However, this PR will introduce an unexpected query when we use #page. It should make an additional query only when the result is empty. Can you change that behaviour?

Member

yuki24 commented Apr 1, 2013

Thank you for the PR! This out_of_rage option sounds good to me. However, this PR will introduce an unexpected query when we use #page. It should make an additional query only when the result is empty. Can you change that behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment