Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #version method docs and some typos [ci-skip] #44693

Merged

Conversation

ghousemohamed
Copy link
Contributor

Summary

Made the doc for the #version method more consistent and fixed a few typos.

Other Information

actionpack/lib/action_pack/version.rb Outdated Show resolved Hide resolved
actionview/lib/action_view/version.rb Outdated Show resolved Hide resolved
activerecord/lib/active_record/version.rb Outdated Show resolved Hide resolved
activestorage/lib/active_storage/version.rb Outdated Show resolved Hide resolved
activesupport/lib/active_support/version.rb Outdated Show resolved Hide resolved
@ghousemohamed
Copy link
Contributor Author

ghousemohamed commented Mar 15, 2022

@rafaelfranca I have a query related to the #version and #gem_version methods. Both the methods return the same value. Shouldn't there be a distinction between the two methods? For example, in railties, I can see that #version returns VERSION::STRING whereas #gem_version returns Gem::Version.new VERSION::STRING. Here there is a clear distinction between the two methods. Should this be the case for all other gems apart from railties?

@rafaelfranca
Copy link
Member

No. The Rails version returns a string because of backwards compatibility. version is also in the other components there also for backwards compatibility since it doesn't add much value deprecate it. We could say version should return strings, but that will break someones code and it is not worth it.

@rafaelfranca rafaelfranca merged commit 5c1bd20 into rails:main Mar 15, 2022
rafaelfranca added a commit that referenced this pull request Mar 15, 2022
…sions

Fix `#version` method docs and some typos [ci-skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants