You passed an unsafe object to raw.
#947
Answered
by
joeldrapper
UnderpantsGnome
asked this question in
Help
-
|
I'm trying to add pagy to an app using a pagination component, and I'm getting the # frozen_string_literal: true
module Components
module Common
class Pagination < Components::Base
prop :pagy, Pagy
def view_template
pagy_nav(@pagy)
end
end
end
endrendered with Common.Pagination(pagy: @pagy) |
Beta Was this translation helpful? Give feedback.
Answered by
joeldrapper
Jul 19, 2025
Replies: 1 comment 5 replies
-
|
Where does the pagy_nav method come from? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Perfect. The problem is that pagy produces a regular string rather than one that is marked as HTML safe.
We're working on a more elegant solution, but for now, change this to a value helper instead of an output helper and then use raw safe to output the value.
raw safe pagy_nav