Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from reprah/fix-pagination
Fix pagination links for support questions
- Loading branch information
Showing
4 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Feature: Pagination for different types of questions | ||
|
||
As a user of the site, I can view pages of different types of questions | ||
|
||
Scenario: View support questions | ||
Given support questions exist | ||
When I visit the support questions page | ||
Then I should see a link to the next page of support questions | ||
|
||
Scenario: View non-support questions | ||
Given questions exist | ||
When I visit the questions page | ||
Then I should see a link to the next page of questions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class PrefixLinkRenderer < WillPaginate::ActionView::LinkRenderer | ||
def initialize(prefix) | ||
@prefix = prefix | ||
super() | ||
end | ||
|
||
protected | ||
|
||
def url(page) | ||
@prefix + super | ||
end | ||
end |