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

Improve Rails console helper methods' descriptions #51731

Merged
merged 1 commit into from
May 20, 2024

Conversation

st0012
Copy link
Contributor

@st0012 st0012 commented May 3, 2024

Motivation / Background

When demonstrating the result of #51705, I received some feedback around the description of the new helpers.

Detail

  1. I made descriptions clearer around what components the methods are interacting with or return, which I think should make them easier to understand.
  2. When updating the descriptions, I noticed that new_session has stopped taking block argument after Removed unwanted code which sets session host in console mode #44748, which nobody seems to discover and it's perhaps never used. And after that update, new_session is the same as app(true), which makes me think it has become obsolete and can be depracted.

Result

Helper methods
  conf           Returns the current IRB context.
  helper         Gets helper methods available to ApplicationController.
  controller     Gets a new instance of ApplicationController.
  new_session    [Deprecated] Please use `app(true)` instead.
  app            Creates a new ActionDispatch::Integration::Session and memoizes it. Use `app(true)` to create a new instance.

Additional information

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Unrelated changes should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

@rails-bot rails-bot bot added the railties label May 3, 2024
@st0012 st0012 force-pushed the improve-rails-helpers-descriptions branch 3 times, most recently from 0de33de to 2b7edf3 Compare May 7, 2024 18:48
@st0012
Copy link
Contributor Author

st0012 commented May 7, 2024

I'm keeping 2 commits separated because one drops a helper.

@st0012
Copy link
Contributor Author

st0012 commented May 7, 2024

@rafaelfranca I'd appreciate your input on this one 🙏

@st0012 st0012 force-pushed the improve-rails-helpers-descriptions branch from 2b7edf3 to 9bf8208 Compare May 15, 2024 04:46
@st0012
Copy link
Contributor Author

st0012 commented May 19, 2024

@rafaelfranca @carlosantoniodasilva 👋 would you consider having this in Rails 7.2 as well?

@st0012 st0012 force-pushed the improve-rails-helpers-descriptions branch from 9bf8208 to 53a0b8c Compare May 19, 2024 14:03
@byroot byroot merged commit cd31b16 into rails:main May 20, 2024
1 of 3 checks passed
byroot added a commit that referenced this pull request May 20, 2024
…ions

Improve Rails console helper methods' descriptions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants