Commit Graph

455 Commits

Author SHA1 Message Date
Dave Aronson
f6b987d521
Replace repeated list literals in Getting Started guide w/ a constant (#49007)
* 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>
2023-08-25 17:14:08 -04:00
Dave Aronson
4ac237de74
select existing article status if any, in Getting Started Guide -- Fixes #45028 (mostly) (#49010)
* 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>
2023-08-24 17:31:46 -04:00
zzak
dadf46de36
Add rubocop-md for linting guides snippets 2023-03-15 10:48:19 +09:00
Missy Davies
d49a3abc01 Capitalize headings to match style guidelines
Fix all headings to follow Rails Guides Guidelines
2022-10-17 17:01:28 -10:00
Jonathan Hefner
9ac01c6a81 Use relative URLs for intra-guide links [ci-skip]
This ensures that the URLs are properly versioned when the guides are
rendered.
2022-08-05 21:36:18 -05:00
Jonathan Hefner
a713f7f22f Fix typos [ci-skip] 2022-08-05 21:36:18 -05:00
Bhaskar Shankarling
8ae17b2afc fixed the delete comment guide and added missing unless statement 2022-07-29 16:35:12 +05:30
Oleg Sklyarov
c487372c4b
replace 303 status code with see_other 2022-06-04 16:10:39 +03:00
Jen Weber
2fb4c18b0a [DOC] Clarify concerns section of Getting Started
Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
2022-03-15 23:30:30 -04:00
Gannon McGibbon
fa8c2ddcce
Merge pull request #44487 from ghousemohamed/patch-8
Removed freenode link from support resources [ci-skip]
2022-02-22 19:25:57 -05:00
Ghouse Mohamed
5ae83f7ce8 Removed freenode link from support resources 2022-02-20 02:51:17 +05:30
Ghouse Mohamed
c2b0864978 Added missing .gitattributes file in documentation 2022-02-20 01:03:34 +05:30
Yunus Ganiyev
0bbfa8861c Update getting_started.md 2022-02-17 15:07:02 -06:00
Jonathan Hefner
4d3930d149 Explain HTTP basic authentication stipulation [ci-skip]
This clarifies that, after successfully authenticating, the HTTP basic
authentication challenge will not appear again when refreshing the page.

Fixes #39741.
2022-02-14 16:36:36 -06:00
David Colby
c144a76796 Update working with javascript guide to cover asset options and Turbo instead of UJS and remove node/yarn from getting started guide 2022-02-11 13:03:06 -06:00
Vipul A M
20846a20dc
Merge pull request #43479 from psychoslave/doc-default-public 2022-01-28 14:51:26 -05:00
Jonathan Hefner
d99befacc1 Revise Turbo-related info in Getting Started guide [ci-skip]
This revises a few recent additions related to Turbo.
2022-01-03 10:58:02 -06:00
Stephan Kämper
70988822ba
Fixes link formatting to Turbo
Signed-off-by: Stephan Kämper <the.tester@seasidetesting.com>
2022-01-02 12:19:30 +01:00
Francis Go
110df65101 Getting Started Guide: Remove code sample 2021-12-28 15:50:15 +01:00
oltdaniel
1f8ec0d90b update getting started guide using turbo
there were some issues left with the deletion procedure due to the new turbo use in v7.0.0
2021-12-22 22:08:08 +01:00
condef5
58d66cfc75 update delete example using turbo 2021-12-20 14:42:18 -05:00
Yasuo Honda
4f08d9d753 Update Rails startup screenshot at Rails Guide
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
2021-12-16 15:05:32 +09:00
Ivan Denysov
f1330049e1
Clarify what 'running a migration' means
It is not obvious to beginners that by 'running a migration' we mean executing the `bin/rails db:migrate` command.
2021-11-09 22:42:43 +01:00
Mathieu Lovato Stumpf Guntz
1cf8e18f16 Add hints on how to deal with values of new fields
Co-authored-by: Sunny Ripert <sunny@sunfox.org>
2021-11-04 06:23:28 +01:00
Xavier Noria
31ad3f1529 Add a section about autoloading in the Getting Started Guide 2021-10-23 21:29:40 +02:00
Alex Lavallee
dda4b24beb
Change "bash" to "shell" in getting started guide
The command can be run in any shell, so shell is a more accurate word
2021-10-01 08:46:11 -07:00
Yohei Yasukawa
ac3d90968f
Fix invalid link to List of Free Programming Books 2021-10-01 12:09:13 +09:00
Camila Maia
edc5ee1fa2 Add missing migrate command to Getting Started section 8.3 2021-09-21 12:01:25 -03:00
Alfred
a2f9a63a82
Reorder getting_started 8.3 to reduce confusion
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.
2021-09-16 14:30:39 -05:00
David Heinemeier Hansson
af7428c4ac
Replace webpack with importmapped Hotwire as default js (#42999)
* 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>
2021-08-26 10:39:36 +02:00
David Heinemeier Hansson
21c9732fae
Remove spring as a default installation option (#42997)
* 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
2021-08-12 12:31:18 +02:00
David Heinemeier Hansson
e34300a921
Stop trying to configure listen by default on compatible platforms (#42985)
* 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
2021-08-11 15:18:43 +02:00
Daniel
599fb11bcd
Fix typo 2021-05-09 08:05:47 -06:00
Aditya Pandit
85c6eb0a0a Minor tweaks for Getting Started Guide [ci skip] 2021-05-01 12:03:53 +05:30
Ashik Salman
b28d7b714d Fixed typo error in the documentation. 2021-04-30 15:53:04 +05:30
Zachary Scott
02423f031f
New-line before the codeblock
I'm pretty sure code blocks need a newline in order to get rendered properly
2021-04-30 15:56:20 +09:00
Becky Marvin
6f3f39acc2
Include code to hide archived comments
Added code to only show non-archived comments, since we allow them to have archived as a status
2021-04-28 22:20:35 -04:00
Jade Rubick
d97b9290ca
Specify rails --version check should be in a new terminal
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.
2021-04-28 10:13:02 -07:00
Oliver Klee
36b7008a9b
Update the "getting started" guide to Rails 6.1
This hopefully will reduce confusion for developers who use the
current Rails version.

[ci skip]
2021-04-14 18:38:09 +02:00
Thais Kusuki
d861ef6210 Fix controller name in Getting Started 2021-03-01 22:30:57 -03:00
Rafael Mendonça França
6487836af8
Rails 7 requires Ruby 2.7 and prefer Ruby 3+
The code cleanup is comming in later commits but this
already remove support to Ruby < 2.7.
2021-02-04 16:34:53 +00:00
ijlee2
74e3e7986f Added a new line after the include statement 2021-01-22 07:56:28 +01:00
ijlee2
a1c6e0caad Removed line for continuity 2021-01-20 14:43:19 +01:00
ijlee2
60cc7f1166 Added :status for continuity 2021-01-20 14:42:00 +01:00
ijlee2
33807a453c Added the unless-block for continuity 2021-01-20 14:33:45 +01:00
Diogo Ribeiro
e1970bb434 Fix article_params method 2021-01-15 09:57:32 +00:00
Santiago Bartesaghi
e83d7dcb2f Use 4XX instead of 2XX for validation errors responses 2021-01-06 00:10:26 -03:00
Jonathan Hefner
def08bdd44 Fix broken link for free programming books [ci-skip]
The file was moved by EbookFoundation/free-programming-books#5199.

Fixes #40977.
2020-12-30 09:21:35 -06:00
Ryuta Kamizono
c02d9e5a3d Fix odd indentation [ci skip] 2020-12-30 14:50:34 +09:00
Jonathan Hefner
cb0da4f817 Fix typos, grammar, and formatting [ci-skip]
This is a collection of minor superficial improvements.  It does not
include any significant content changes.
2020-12-28 12:05:53 -06:00