Skip to content

Commit

Permalink
unescaped notation for all erb usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Apr 16, 2018
1 parent 26c068f commit facc4c3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ Paginate your collection in some controller:

Render the navigation links with a super-fast helper in some view:

```HTML+ERB
<%= pagy_nav(@pagy) %>
```erb
<%== pagy_nav(@pagy) %>
```

Or - if you prefer - render the navigation links with a template:

```HTML+ERB
<%= render 'pagy/nav', locals: {pagy: @pagy} %>
```erb
<%== render 'pagy/nav', locals: {pagy: @pagy} %>
```

## Support, Comments and Feature Requests
Expand Down
14 changes: 7 additions & 7 deletions docs/api/frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ end
```
use some of its method in some view:

```HTML+ERB
<%= pagy_nav(@pagy) %>
<%= pagy_info(@pagy) %>
```erb
<%== pagy_nav(@pagy) %>
<%== pagy_info(@pagy) %>
```

### Methods
Expand All @@ -32,8 +32,8 @@ Please, keep in mind that overriding any method is very easy with pagy. Indeed y

This method takes the pagy object and returns the HTML string with the pagination links, which are wrapped in a `nav` tag and are ready to use in your view. For example:

```HTML+ERB
<%= pagy_nav(@pagy) %>
```erb
<%== pagy_nav(@pagy) %>
```

The `pagy/nav` templates produce the same output, and can be used as an easier (but slower) starting point to override it.
Expand All @@ -54,8 +54,8 @@ See also [Using templates](/pagy/how-to#using-templates).

This method provides the info about the content of the current pagination. For example:

```HTML+ERB
<%= pagy_info(@pagy) %>
```erb
<%== pagy_info(@pagy) %>
```

Will produce something like:
Expand Down
16 changes: 8 additions & 8 deletions docs/how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ include Pagy::Frontend
```
Render the navigation links in some view...
with a fast helper:
```HTML+ERB
<%= pagy_nav(@pagy) %>
```erb
<%== pagy_nav(@pagy) %>
```
or with a template:
```HTML+ERB
<%= render 'pagy/nav', locals: {pagy: @pagy} %>
```erb
<%== render 'pagy/nav', locals: {pagy: @pagy} %>
```

### Paginate Any Collection
Expand Down Expand Up @@ -63,8 +63,8 @@ This is basically what the `pagy` method included in your controller does for yo
@pagy, @records = pagy(Product.some_scope)
```
Then of course, regardless the kind of collection, you can render the navigation links in your view:
```HTML+ERB
<%= pagy_nav(@pagy) %>
```erb
<%== pagy_nav(@pagy) %>
```
See the [Pagy::Backend source](https://github.com/ddnexus/pagy/blob/master/lib/pagy/backend.rb) and the [Pagy::Backend API documentation](/pagy/api/backend) for more details.

Expand Down Expand Up @@ -135,8 +135,8 @@ You can easily try different options (also asymmetrical) in a console by changin

These helpers take the pagy object and returns the HTML string with the pagination links, which are wrapped in a `nav` tag and are ready to use in your view. For example:

```HTML+ERB
<%= pagy_nav(@pagy) %>
```erb
<%== pagy_nav(@pagy) %>
```
Helpers are the preferred choice (over templates) for their performance. If you need to override a `pagy_nav*` helper you can copy and paste it in your helper end edit it there. It is a simple concatenation of strings with a very simple logic.

Expand Down

0 comments on commit facc4c3

Please sign in to comment.