Sha256: 405572f205567ef90f35c487fed7c06cf3210d6acbc130f62feecccfc1312878

Contents?: true

Size: 552 Bytes

Versions: 3

Compression:

Stored size: 552 Bytes

Contents

<%- if collection.page_count > 1 -%>
  <p>
    <%- if collection.previous_page? -%>
    <%= link_to 'previous', :page => collection.page-1 -%>
    <%- end -%>
    <%- 1.upto(collection.page_count) do |page| -%>
      <%- if page == collection.page -%>
        <%= page.to_s -%>
      <%- else -%>
        <%= link_to page, :page => page -%>
      <%- end -%>
    <%- end -%>
    <%= separator unless collection.last_page? -%>
    <%- if collection.next_page? -%>
    <%= link_to 'next', :page => collection.page+1 -%>
    <%- end -%>
  </p>
<%- end -%>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
view_models-4.0.1 lib/rails/generators/view_models/templates/views/_pagination.html.erb
view_models-3.0.1 lib/rails/generators/view_models/templates/views/_pagination.html.erb
view_models-3.0.0 lib/rails/generators/view_models/templates/views/_pagination.html.erb