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

Removed unwanted code which sets session host in console mode #44748

Merged

Conversation

ghousemohamed
Copy link
Contributor

Summary

Setting the session host for the app instance in the following way for console mode is
not needed.

@app_integration_instance ||= new_session do |sess|
sess.host! "www.example.com"
end

The default host is already being set in ActionDispatch::Testing::Integration, which is
the session class that is being used by the app instance.

class Session
DEFAULT_HOST = "www.example.com"

The session class that is being used by the app instance:

session = ActionDispatch::Integration::Session.new(app)

@rails-bot rails-bot bot added the railties label Mar 22, 2022
@ghousemohamed ghousemohamed force-pushed the remove-setting-session-host-in-console branch from 9d0f09e to d525788 Compare March 22, 2022 21:30
@tenderlove tenderlove merged commit 02ad57a into rails:main Mar 23, 2022
st0012 added a commit to Shopify/rails that referenced this pull request May 3, 2024
After rails#44748, the `new_session` helper no longer takes a block and is
the same as calling `app(true)`. Therefore, I think there's no reason to
expose it to Rails console users.
st0012 added a commit to Shopify/rails that referenced this pull request May 3, 2024
After rails#44748, the `new_session` helper no longer takes a block and is
the same as calling `app(true)`. Therefore, I think there's no reason to
expose it to Rails console users.
st0012 added a commit to Shopify/rails that referenced this pull request May 6, 2024
After rails#44748, the `new_session` helper no longer takes a block and is
the same as calling `app(true)`. Therefore, I think there's no reason to
expose it to Rails console users.
st0012 added a commit to Shopify/rails that referenced this pull request May 7, 2024
After rails#44748, the `new_session` helper no longer takes a block and is
the same as calling `app(true)`. Therefore, I think there's no reason to
expose it to Rails console users.
st0012 added a commit to Shopify/rails that referenced this pull request May 15, 2024
After rails#44748, the `new_session` helper no longer takes a block and is
the same as calling `app(true)`. Therefore, I think there's no reason to
expose it to Rails console users.
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