meta-tags
meta-tags copied to clipboard
Renaming helpers to prevent collisions?
Hello,
I think that title and description are very generic names, likely to cause collisions in apps.
Actually I had strange errors and realized it was caused by helpers that already existed in my app (in a component context, as I use komponent).
I suggest renaming them to page_title and page_description, or meta_title and meta_description.
I know this would be a breaking change, but would you consider it for an upcoming major version?
Thanks
Yes, this is a great idea, I have been thinking about this change for a while. My only suggestion would be to return title and description back for the next version (2.10) and raise deprecation warnings on every use.
With version 3 we can remove the old methods. What do you think?
Thanks for the reply. I will update the PR to raise deprecation warnings for now. Maybe we could also add an option to manually use the new names only, starting with the next release?
Also, what do you think about the naming? Actually, I think using the meta_ prefix makes more sense (as it's closer to the name of the gem, and less likely to cause collisions):
title>meta_titledescription>meta_descriptionkeywords>meta_keywordsnofollow>meta_nofollownoindex>meta_noindexrefresh>meta_refresh
Hi @kpumuk can you reply to my question above about the naming? I'd like to finish this and get it merged :)
@kpumuk meta_ prefix seems great to me. Would this pr be merged?
Closing as stale.