-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Web Console documentation for the upcoming 2.1 release #19097
Conversation
7670a60
to
3e5b065
Compare
The console executes pure Ruby code. You can define and instantiate | ||
custom classes, create new models and inspect variables. | ||
|
||
NOTE: Only one console can be rendered per request. Newer versions of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you can simply write:
NOTE: Only one console can be rendered per request. Otherwise,
web-console
will raise an error on otherconsole
invocations.
"Newer" will most likely be wrong in the near future and it's important to document the current behavior, not when it was added. What do you think ?
@gsamokovarov : nice, this looks way better than before! 👍 |
5b605dc
to
be78c03
Compare
``` | ||
|
||
This will render a console in the browser on top of the post creation HTML | ||
view. You don't need to care for the `console` output, the console won't be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...care about the...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
6b915de
to
7d8f1b2
Compare
### Settings | ||
|
||
* `config.web_console.whitelisted_ips`: Authorized list of IPv4 or IPv6 | ||
addresses and networks (default: `127.0.0.1/8, ::1`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it should be defaults
as @vipulnsward said, nope ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed the byebug
format above. I'll quote, since I can't easily link to the markdown line on GH:
set autoreload: Reload source code when changed (default: true).
If we are to change this format, I think we should change the byebug
one as well. WDYT @robin850, @vipulnsward?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that we should be consistent so I'd go with defaults
and edit the byebug section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I'll do the byebug
section in another PR, so I don't scope creep this one. I'll force push this one shortly.
94b5101
to
f46b198
Compare
With the upcoming 2.1 [web-console release], I have tweaked the existing documentation a bit. I tried to focus on the spawning console use case, because I think a lot of people overlook that. Tried to explain it as best as I can, however, my English and prose aren't my best skills :) If you guys can chime in and help me improve the wording, I would be extremely grateful. There has been some configuration default changes. For example, the whitelisted IPs always include IPv4 and IPv6 localhosts now and this wasn't the case in 2.0. I think a lot of people got bitten by it, that's why I changed it. I'm a bit confused on how to document this. Should I just document the latest version, I don't think I can expect all the people reading the guide to be on it. [web-console release]: rails/web-console#110
In rails#19097 we had a discussion where we decided to change `byebug` settings sections default part to actually say `defaults`.
Web Console documentation for the upcoming 2.1 release [ci skip]
Awesome, thanks @gsamokovarov ! :-) |
And thank you for helping me with the wording :) |
With the upcoming 2.1 web-console release, I have tweaked the existing
documentation a bit. I tried to focus on the spawning console use case,
because I think a lot of people overlook that.
Tried to explain it as best as I can, however, my English and prose
aren't my best qualities :) If you guys can chime in and help me improve
the wording, I would be extremely grateful.
There has been some configuration default changes. For example, the
whitelisted ips always include IPv4 and IPv6 localhosts now and this
wasn't the case in 2.0. I think a lot of people got bitten by it, that's
why I changed it. I'm a bit confused on how to document this. Should I
just document the latest version, I don't think I can expect all the
people reading the guide to be on it.