Skip to content

Commit

Permalink
👽️ Update to new tag helper syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
kadams54 committed May 25, 2024
1 parent eadcb2d commit 8baab9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/initializers/will_paginate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ class SpectreLinkRenderer < LinkRenderer
protected

def html_container(html)
tag :nav, tag(:ul, html, class: ul_class)
tag.nav tag.ul(html, class: ul_class)
end

def page_number(page)
tag :li, link(page, page, rel: rel_value(page)), class: ["page-item", ("active" if page == current_page)].compact.join(" ")
tag.li link(page, page, rel: rel_value(page)), class: ["page-item", ("active" if page == current_page)].compact.join(" ")
end

def gap
tag :li, tag(:span, "&hellip;".html_safe), class: "page-item"
tag.li tag.span("&hellip;".html_safe), class: "page-item"
end

def previous_or_next_page(page, text, classname)
tag :li, link(text, page || "#"), class: ["page-item", ("disabled" unless page)].compact.join(" ")
tag.li link(text, page || "#"), class: ["page-item", ("disabled" unless page)].compact.join(" ")
end

def ul_class
Expand Down

0 comments on commit 8baab9f

Please sign in to comment.