* Replace list literals w/ Visible::VALID_STATUSES
In Getting Started guide, in the article and comment status dropdowns, use Visible::VALID_STATUSES instead of repeating the list of valid statuses. This makes the code DRYer and more expressive. This PR also adds a comment to that effect.
* Remove text changes, leave just code
Co-authored-by: Rafael Mendonça França <rafael@rubyonrails.org>
* select existing article status if any
In the Getting Started guide, in the dropdown for an article or comment's status, pre-selecting `public` will make _all_ articles seem `public` even if their status is really something else -- even `nil`. This was reported in issue #45028. Selecting `article.status || 'public'` instead will fix this, in _most_ cases. Pre-existing articles with `nil` status will show up as `public`, but if the form is submitted, they will indeed become `public`.
This commit makes that change, and adds text to explain why it is done.
* Simplify wording of changes to Getting Started
Co-authored-by: Rafael Mendonça França <rafael@rubyonrails.org>
This clarifies that, after successfully authenticating, the HTTP basic
authentication challenge will not appear again when refreshing the page.
Fixes#39741.
This commit updates Rails startup screenshot at Rails Guide
to support 5889e6ba92
Here are some notes:
- It used to be called "Yay! You're on Rails!" page. Now the new page
does not have any text messages. Then I just call it "The Rails startup
page".
- This Rails statup page screenshot is taken at my Macbook and saved as
PNG. No compressions have been made.
- Specific Rails version and Ruby versions are included.
Fix#43892
Recently started learning Rails through The Odin Project, and section 8.3 of the getting started guide is told to be avoided in the curriculum due to its confusing wording.
I moved the migration generation to the beginning of the section and changed the words 'you might add' to 'you would add'.
It might seem inconsequential but it hung myself and others at the TOP.
If there is a problem with my correction that I can fix, I will gladly do so.
* Turbolinks is being replaced with Hotwire
* Make --webpack opt-in
* Don't use specific webpacker installers any more in preparation for next Webpacker
* Update railties/lib/rails/app_updater.rb
Co-authored-by: Alex Ghiculescu <alex@tanda.co>
* Trailing whitespace
* Convert to Turbo data attribute for tracking
* Default is no webpack, no hotwire
* Swap out turbolinks references for hotwire
* Drop explicit return
* Only generate package.json if using webpack
* Only create package.json in webpack mode
* Only create app/javascript in webpack mode
* Generate correct style/js links based on js mode
* Fix tests from changed output format
Not sure why these are showing up in this PR, though.
* Rubocopping
* Stick with webpack for the test app for now
* Adjust tests
* Replace minitest-reporters with minitest-ci (#43016)
minitest-reporters is used to create junit xml reports on CI.
But when it loads before rails minitest plugin makes
`Rails::TestUnitReporter` not being added as a reporter.
minitest-ci is now only loaded at ci and does not interferes with
rails minitest plugins. And keeps junit reports workings
* Too heavy handed to actually run bundle
Just like we don't auto-migrate
* Pin js frameworks in importmap
Instead of having importmap preconfigure it.
* Match updated app/javascript path
* No need for the explaining comment
* Fixes test cases for replace webpack with importmapped Hotwire as default js (#42999)
* Fix rubocop issues
* Fix more railities test cases
* Fix plugin generator railties shared test cases
* Fix Action Text install generator asset pipeline spec
* They're modules, not files
* Let dev use the latest release as well
So we don't have to replace unexisting dev releases with latest release
* Make Webpack responsible for generating all the JS files it needs
Webpacker 6 has already moved from app/javascript to app/packs.
* Don't add rails/ujs by default any longer
All the ajax/form functionality has been superseded by Turbo. The rest lives in a weird inbetween land we need to address through other means.
* Use new importmap location
* Switch to using turbo-rails and stimulus-rails directly
The hotwire-rails gem does not offer enough value for its indirection
* Use latest Webpacker
* Prevent version resolution requests from getting swallowed
* Use ESM syntax for imports
* Move management of yarn, package.json, etc to Webpacker 6
* Update for Webpacker 6
* Move bin/setup addition to Webpacker as well
* Remove dead tests
* Bump to Webpacker 6.0.0.rc.2
* No longer relevant given the new default is no webpacker
* Rely on Webpacker 6
* No longer relevant
* No longer relevant
* Make cable channel generator work for both webpacker and importmap setups
* Fix tests
* For tests testing importmap way
* Use Webpacker 6 dummy
* RuboCopping
* One more bump to fix webpack-dev-server
* Another bump. Hopefully the last one!
* Also enough to not want turbo tracking on
* Fix tests
* Latest
* Fix tests
* Fix more tests
* Fix tests
Co-authored-by: Alex Ghiculescu <alex@tanda.co>
Co-authored-by: André Luis Leal Cardoso Junior <andrehjr@gmail.com>
Co-authored-by: Abhay Nikam <nikam.abhay1@gmail.com>
Co-authored-by: Guillermo Iguaran <guilleiguaran@gmail.com>
* Remove spring as a default installation option
Faster computers have meant that most apps won't see a big benefit from Spring on small to moderate size apps. Thus the pain of dealing with the occasional spring issue is no longer warranted by default.
* Errant end
* No longer an option
* Additional spring removals
* Pointer to docs is enough
* Stop trying to configure listen by default on compatible platforms
Modern computers with SSDs don't see much/any benefit from having an evented file update watcher. Remove complexity by taking this spinning-drive concession out.
* Actually need listen for testing the opt-in
* Test no longer relevant
After doing gem install rails, your environment won't pick up the fact you have rails installed unless you create a new terminal window for it. This can trip people up, so adding a few words to the guide will prevent people from having to search for [why Rails is needing to be installed as root](https://stackoverflow.com/questions/7788946/rails-keeps-telling-me-that-its-not-currently-installed). Worse, without that guidance, many people will install rails as root, when that is unnecessary.