Closed rnitta closed 5 years ago
<% set_meta_tags noindex: 'robots', nofollow: 'googlebot' %> <%= display_meta_tags%>
and it's expected output will be
<meta name="robots" content="noindex"> <meta name="googlebot" content="nofollow">
but now actually the output is
<meta name="robots" content="noindex, nofollow">
with more research, I found this causes only if noindex name is 'robots' or anything other than String object. so then,
noindex
<% set_meta_tags noindex: 'googlebot', nofollow: 'hogehoge' %> <%= display_meta_tags%>
doesn't matter:
<meta name="googlebot" content="noindex"> <meta name="hogehoge" content="nofollow">
I think this is a bug of these code: https://github.com/kpumuk/meta-tags/blob/c3addee0c5f7e047ff79d13f7f6282e8500f9ce2/lib/meta_tags/meta_tags_collection.rb#L145-L152 https://github.com/kpumuk/meta-tags/blob/c3addee0c5f7e047ff79d13f7f6282e8500f9ce2/lib/meta_tags/meta_tags_collection.rb#L198-L204
especially in https://github.com/kpumuk/meta-tags/blob/c3addee0c5f7e047ff79d13f7f6282e8500f9ce2/lib/meta_tags/meta_tags_collection.rb#L200
Thank you for the report, the issue should be resolved in master, and in the version 2.12.0 when it is released.
2.12.0
and it's expected output will be
but now actually the output is
with more research, I found this causes only if
noindex
name is 'robots' or anything other than String object. so then,doesn't matter:
I think this is a bug of these code: https://github.com/kpumuk/meta-tags/blob/c3addee0c5f7e047ff79d13f7f6282e8500f9ce2/lib/meta_tags/meta_tags_collection.rb#L145-L152 https://github.com/kpumuk/meta-tags/blob/c3addee0c5f7e047ff79d13f7f6282e8500f9ce2/lib/meta_tags/meta_tags_collection.rb#L198-L204
especially in https://github.com/kpumuk/meta-tags/blob/c3addee0c5f7e047ff79d13f7f6282e8500f9ce2/lib/meta_tags/meta_tags_collection.rb#L200