Skip to content

Commit

Permalink
fix: Use view_assigns to fetch meta_tags
Browse files Browse the repository at this point in the history
  • Loading branch information
joelmoss committed Feb 1, 2024
1 parent b1b6424 commit 2061a8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/phlexible/rails/meta_tags_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Phlexible
module Rails
class MetaTagsComponent < Phlex::HTML
def template
controller.instance_variable_get(:@meta_tags)&.each do |name, content|
helpers.controller.view_assigns['meta_tags']&.each do |name, content|
meta name: name, content: content.is_a?(String) ? content : content.to_json
end
end
Expand Down

0 comments on commit 2061a8f

Please sign in to comment.