Commit Graph

81439 Commits

Author SHA1 Message Date
Xavier Noria 89801b2a43 Depend on ruby/debug, replacing Byebug
ruby/debug is a new debugger that is going to ship with CRuby.

It makes sense for Rails to switch to this one because that is
where the language is heading, and because Byebug is not fully
compatible with Zeitwerk. See

    https://github.com/deivid-rodriguez/byebug/issues/564

While ruby/debug has not been heavily tested with Zeitwerk,
casual usage seems to suggest it works without issues, including
explicit namespaces, which is where Byebug and Zeitwerk conflict.

Byebug is terrific, thanks a lot for all these years. ❤️
2021-09-08 17:35:41 +02:00
David Heinemeier Hansson fa1a4b657c Let jsbundling-rails expand without requiring a change in Rails 2021-09-07 21:00:06 +02:00
David Heinemeier Hansson 83808166e6
Add --css app generator option (#43177)
* Add --css to preconfigure a CSS bundler/processor

* Simpler conditional

* Add CSS gems

* Test CSS options
2021-09-07 17:48:13 +02:00
Jean Boussier 061bf3156f
Merge pull request #43148 from jbourassa/polymorphic-custom-name-fixes
Use `polymorphic_class_for` over `constantize`
2021-09-07 08:31:43 +02:00
Jimmy Bourassa 2ea5ff9e13
Use `polymorphic_class_for` over `constantize`
This commit fixes 2 cases where `constantize` was used instead of
of calling `polymorphic_class_for` to retrieve the class associated
with a given string for polymorphic `belongs_to`.
2021-09-06 17:16:43 -04:00
Ryuta Kamizono e1f90a30a2
Merge pull request #43171 from yykamei/replace-location-with-request-in-process_action.action_controller
Replace :location with :request in process_action.action_controller

[ci-skip]
2021-09-07 05:04:38 +09:00
David Heinemeier Hansson 7595c922a6
Use the combined jsbundling-rails gem instead of individual js bundler gems (#43172)
* Use the combined jsbundling-rails gem instead of individual js bundler gems

* Remove Webpacker remnants

* Replace webpacker with jsbundling-rails
2021-09-06 16:44:44 +02:00
Jean Boussier 532ef0d13c Add back Lint/UselessAssignment
Fix: #43169
2021-09-06 16:24:37 +02:00
Yutaka Kamei 92ac51bf66
Replace :location with :request in process_action.action_controller
The payload of `process_action.action_controller` seems to be updated
via b5c6f33f0d
2021-09-06 22:31:32 +09:00
Jean Boussier 78e402077d
Merge pull request #43170 from byroot/rubocop-explicit-block-argument
Enable `Style/ExplicitBlockArgument` cop
2021-09-05 18:13:42 +02:00
Jean Boussier c91c266872 Enable `Style/ExplicitBlockArgument` cop
This reduce the stack size which is beneficial for
exceptions performance.

See: https://gist.github.com/byroot/cb3bcadcc3701c2518d002fb8d3a4e7a

However the cop is unsafe because it might change the block arity,
so it can run into some false positives.
2021-09-05 17:06:19 +02:00
Jean Boussier 5fbc750840 Get rid of `mattr_accessor` in `ActiveSupport::Dependencies`
Since the module isn't included anywhere and is purely static
there iss no point using `mattr_accessor`, which define instance
accessors and other extra overhead.

Regular `attr_accessor` does the job just fine.
2021-09-05 12:42:23 +02:00
Xavier Noria 1d6355f6e1 Move Zeitwerk to railties
Active Support should not know about Rails. Once classic has been removed,
AS should get anything it needs from the application as usual.
2021-09-05 03:37:46 +02:00
Ryuta Kamizono f967bce8a8
Merge pull request #43166 from ceritium/fix-rubocop-offense
Fix rubocop offense
2021-09-05 03:57:09 +09:00
Jose Galisteo 86ee45477c Fix rubocop offense 2021-09-04 20:48:35 +02:00
Xavier Noria 5346dfdf74 Move the default autoloaders inflector to railties 2021-09-04 20:44:39 +02:00
David Heinemeier Hansson abc43f0448
Add rollup as JavaScript option (#43164) 2021-09-04 19:56:21 +02:00
David Heinemeier Hansson abc042cf9e Fix trailing whitespace 2021-09-04 19:47:32 +02:00
David Heinemeier Hansson 82e4432058
Javascript generator option with choices (#43160)
* Switch to a single controller option for choosing JavaScript approach

* Remove remnants of webpacker specific work within Rails

* No longer used

* Missing space

* Raise if unknown option is passed

* Style

* Use latest versions

* Make channels setup generic to all node setups

* Make Action Text installer work with any node package manager

* Explaining variables are not useless

* Rubocop pleasing

* Don't rely on Rails.root

Tests don't like it!

* Rubocopping

* Assume importmap

* No longer relevant

* Another cop

* Style

* Correct installation notice

* Add dependencies for action cable when adding a channel

* Fix paths to be relative to generator

* Just go straight to yarn, forget about binstub

* Fix tests

* Fixup installer, only yarn once

* Test generically with run

* Style

* Fix reference and reversibility

* Style

* Fix test

* Test pinning dependencies

* Remove extra space

* Add more tests

* Use latest dependencies

* Relegated this to controllers

* Refactor ChannelGenerator + more tests

Use a uniform level of abstraction
2021-09-04 11:53:57 +02:00
Xavier Noria 0b15b7d59c More examples in the autoloading guide 2021-09-04 10:10:36 +02:00
Xavier Noria 43ff2bfef0 Autoloading notes in the upgrading guide 2021-09-04 09:54:26 +02:00
Xavier Noria e0d77f124d Formatting 2021-09-04 09:32:04 +02:00
Xavier Noria d9fc52cc7b Update the AS CHANGELOG 2021-09-04 09:30:08 +02:00
Ryuta Kamizono b71d157b3f
Merge pull request #43158 from p8/guides/improve-configuring
Small improvements to the Configuring guide [ci-skip]
2021-09-04 15:08:30 +09:00
Xavier Noria 556572ac19 Fixes typo 2021-09-04 07:56:57 +02:00
Petrik b403e48563 Small improvements to the Configuring guide [ci-skip]
Made things more consistent, added missing backticks and improved
sentences.

Co-authored-by: Ryuta Kamizono <kamipo@gmail.com>
2021-09-03 14:38:10 +02:00
Ryuta Kamizono 9c77d72ecc
Merge pull request #43159 from p8/guides/improve-active-storage-config-examples
Show Active Storage configs defaults as multiline code blocks [ci-skip]
2021-09-03 20:41:33 +09:00
Petrik a80f1e3482 Show Active Storage configs defaults as multiline code blocks [ci-skip]
This makes it more readable and it is easier to copy the values.
2021-09-03 11:21:46 +02:00
Jonathan Hefner a44fbb5dca
Merge pull request #43138 from p8/guides/use-headings-for-configuration-options
Use headings for configs in Configuration guide [ci-skip]
2021-09-02 15:03:24 -05:00
Petrik fe27a22b7c Use headings for configs in Configuration guide [ci-skip]
The current configurations in the Configuration guide are described
using unordered lists. This can be error prone to formatting errors and
doesn't allow deeplinking to configuration options.

If we use headings instead we can deeplink to these options from other guides.
2021-09-02 21:49:32 +02:00
Jonathan Hefner 2cc0acafeb
Merge pull request #43152 from abhaynikam/update-webpacker-guides
Update webpacker guides after version upgrade [ci-skip]
2021-09-02 14:32:44 -05:00
Xavier Noria 7ce6f45ae3 Revise private docs of AS::Dependencies 2021-09-02 19:41:21 +02:00
Abhay Nikam b7f67b4e7a Update the webpacker installation documentation as Rails 7 won't default install webpacker
Webpacker gem has removed the framework installer and Rails app installer has removed the support to pass the framework names to webpack option

Webpacker engine guides are removed
2021-09-02 21:39:06 +05:30
Jonathan Hefner 26ef62f229
Merge pull request #43153 from rahul100885/webpacker_doc
Fix typo [ci skip]
2021-09-02 08:31:39 -05:00
Rahul Chaudhari e14e4e49cd Fix typo [ci skip] 2021-09-02 16:16:33 +05:30
Xavier Noria 174ee7bb60 Depends on Zeitwerk 2.5.0.beta3 2021-09-01 15:31:04 +02:00
David Heinemeier Hansson c236ff686c
No need to have special accomodations for a github version in dev/edge/main (#43139) 2021-08-31 22:57:34 +02:00
Jonathan Hefner b4ccee7a8a
Merge pull request #43111 from ceritium/active-storage-overview-consistent-links
Fix links inconsistency on Active Storage overview guide [ci-skip]
2021-08-31 09:44:35 -05:00
Jonathan Hefner 47f9e6725e
Merge pull request #43127 from ceritium/fix-weak-links
Fix weak links on guides [ci-skip]
2021-08-31 09:15:21 -05:00
Jose Galisteo 4c6481f08f Replace link to the line on Github with Rdoc link
The previous link tries to point to the exact line where a method is defined.
This link is weak and will point to a different place if someone adds or removes
code in that file.

As a solution, the link will point to the method documentation on rdoc.info
2021-08-31 15:56:56 +02:00
Jose Galisteo 87b7ca3e0a Replace weak links with config names
Those previous links try to point to the exact line where defines the
configuration. It is weak because it will point to a different place if someone
adds or removes code in those files.
2021-08-31 15:55:28 +02:00
Jonathan Hefner 8d8e5a52c7
Merge pull request #43109 from cbliard/patch-1
Clarify STI acronym [ci-skip]
2021-08-31 08:42:57 -05:00
Christophe Bliard c18d522642 Clarify STI acronym
Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
2021-08-31 15:32:25 +02:00
Ryuta Kamizono ce546c7d3a
Merge pull request #43128 from ceritium/update-missing-mailing-lists
Update missing Rails mailing list URLs [ci-skip]
2021-08-30 21:11:19 +09:00
Guillermo Iguaran d0b0c1caa6
Merge pull request #43118 from mbayucot/43114-add-ssl-support-for-postgresql-dbconsole
Add SSL support for postgresql in `bin/rails dbconsole`
2021-08-29 18:13:47 -07:00
Jose Galisteo 553458873f Update missing Rails mailing list URLs
The PR https://github.com/rails/rails/pull/38864 updated the mailing list URLs
in the documentation but missed the ones on RELEASING_RAILS.md
2021-08-29 23:11:47 +02:00
Guillermo Iguaran 32612c6d41
Merge branch 'main' into 43114-add-ssl-support-for-postgresql-dbconsole 2021-08-29 13:18:58 -07:00
Guillermo Iguaran b71a9ccce0 Move most recent CHANGELOG entry to the top of file 2021-08-29 09:59:37 -07:00
Guillermo Iguaran 0d31319562
Merge pull request #43089 from kaukas/template-gem-comments
Support gem comments in Rails templates
2021-08-29 09:57:38 -07:00
Xavier Noria 0c9f6b7f88 Copy edits the railties CHANGELOG 2021-08-29 17:44:25 +02:00