Skip to content

Commit

Permalink
a few docs changes for the migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Mar 16, 2019
1 parent 2a90e6a commit 2c53e76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h1 id="site-title">{{ site.title | default: site.github.repository_name }} <a c
<a href="{{ site.baseurl }}/extras/semantic"><p class="indent1" {% if page.title == 'Semantic' %}id="active"{% endif %} >Semantic</p></a>
<a href="{{ site.baseurl }}/extras/support"><p class="indent1" {% if page.title == 'Support' %}id="active"{% endif %} >Support</p></a>
<a href="{{ site.baseurl }}/extras/trim"><p class="indent1" {% if page.title == 'Trim' %}id="active"{% endif %} >Trim</p></a>
<a href="{{ site.baseurl }}/migration-tips"><p {% if page.title == 'Migration Tips' %}id="active"{% endif %} >Migration Tips</p></a>
<a href="{{ site.baseurl }}/migration-guide"><p {% if page.title == 'Migration Guide' %}id="active"{% endif %} >Migrating from WillPaginate/Kaminari</p></a>
<p id="gitter-support"><a href="https://gitter.im/ruby-pagy/Lobby" rel="nofollow" target="_blank">&gt; Chat Support on Gitter &lt;</a></p>
</div>

Expand Down
12 changes: 6 additions & 6 deletions docs/migration-tips.md → docs/migration-guide.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
---
title: Migration Tips
title: Migration Guide
---
# Migrating from WillPaginate and Kaminari

This page tries to cover most of the standard changes you will need to make in order to to migrate from a legacy pagination, however, if the legacy pagination is higly customized you may need more digging into the Pagy documentation.

Feel free to [ask on Gitter](https://gitter.im/ruby-pagy/Lobby) if you need more assistance.

## Phases
## Steps

The Pagy API is quite different from other pagination gems, so there is not always a one-to-one correlation between the changes you will have to make, however, if you split the process in the following general phases it should be quite simple.
The Pagy API is quite different from other pagination gems, so there is not always a one-to-one correlation between the changes you will have to make, however, if you split the process in the following general steps it should be quite simple.

1. Removing the legacy code, trying to convert the statements that have a direct relation with Pagy
2. Running the app so to raise exceptions in order to find legacy code that may still be in place
3. When the app runs without errors, adjusting the pagination to look and work as before: just many times faster and using many times less memory ;)

### Removing the old code

In this phase you will search statements from legacy pagination gems, remove them and possibly write the equivalent Pagy statements if that makes sense for Pagy:
In this step you will search statements from legacy pagination gems, remove them and possibly write the equivalent Pagy statements if that makes sense for Pagy:

- If it makes sense, you should add the equivalent Pagy statement and remove the legacy statement(s).
- If it doesn't make sense, then just remove the legacy statement.

**Notice:** Don't worry about missing something in this phase: if anything wont work as before you can fix it later in the process.
**Notice:** Don't worry about missing something in this step: if anything wont work as before you can fix it later in the process.

#### Preparation

Expand Down Expand Up @@ -125,7 +125,7 @@ Please take a look at the topics in the [how-to](how-to.md) documentation: that

### CSSs

If the app uses the bootstrap pagination, the same CSSs should work seamlessly with `pagy_bootstrap_nav` or with any of the bootstrap templates. If the app doesn't use bootstrap, you may need to rename some rule in your CSSs.
The css styling that you may have applied to the pagination elements may need some minor change. However if the app uses the pagination from bootstrap (or some other framework), the same CSSs should work seamlessly with the pagy nave helpers or with any of the bootstrap templates.

### I18n

Expand Down

0 comments on commit 2c53e76

Please sign in to comment.