You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I like the API offered by this Gem, unfortunately it doesn't work out of the box for a newly installed Rails (5.1.4) app.
I added <%= page_meta %> in the head of my application default layout, and translations for the current page title in the current locale, but got this error instead:
ActionView::Template::Error (undefined method `empty?' for #<Encoding:UTF-8>):
Any idea what causes this? I would have preferred sending a PR but I wasn't able to spot where the issue comes from.
Thanks!
The text was updated successfully, but these errors were encountered:
I just used a monkey patch as a quick and dirty workaround. This gem is used by the https://github.com/fnando/coupons gem, and as I don't really care about the meta title of the coupons page, I just monkey patched it like this. This stops the error, but I haven't checked if it still shows the meta attributes appropriately as in my situation I don't care about them.
put this in
config/initilizers/page_meta_monkey_patch.rb
#https://github.com/fnando/page_meta/issues/3
module PageMeta
class MetaTag
class Charset < MetaTag
def render
return if content.blank?
helpers.tag(:meta, charset: content)
end
end
end
end
Hi,
I like the API offered by this Gem, unfortunately it doesn't work out of the box for a newly installed Rails (5.1.4) app.
I added
<%= page_meta %>
in the head of my application default layout, and translations for the current page title in the current locale, but got this error instead:Any idea what causes this? I would have preferred sending a PR but I wasn't able to spot where the issue comes from.
Thanks!
The text was updated successfully, but these errors were encountered: