| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
`--javascript` option was removed by 42198064c35ff3b701496309f90df2abc229efbe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix assertions of auto-generated ActiveStorage JS
Since #33079
* Correct message on the `assert_equal` failure
Related to #33079
* Test ActionCable's js files
This commit adds `app/javascript/channels/consumer.js`, and
`app/javascript/channels/index.js` to `DEFAULT_APP_FILES` in order
to assert their existance in `test_skeleton_is_created`.
Related to #33079
* Assert no match `javascript_pack_tag` in `application.html.erb`
Since #33079 `rails new` generates `application.html.erb` file
with `javascript_pack_tag` instead of `javascript_include_tag`.
Note that there some tests that asserting no matching
`javascript_include_tag` in the `application.html.erb` file
for newly generated rails plugins.
It is related to #34009 and shouldn't be changed right now.
|
|\
| |
| | |
Reduce string allocations in read/write_attribute
|
|/
|
|
|
|
|
|
|
| |
When `attr_name` is passed as a symbol, it's currently converted to a
string by `attribute_alias?`, and potentially also `attribute_alias`,
as well as by the `read_attribute`/`write_attribute` method itself.
By converting `attr_name` to a string up front, the extra allocations
related to attribute aliases can be avoided.
|
|\
| |
| | |
Add message to exception in datetime type
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Improve layout of Rails Guides index
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The previous version wasn’t matching the Rails Guides logo source file
listed at https://github.com/rails/homepage/blob/master/materials/rails_guides_logo.psd
somehow. It was also a GIF when an 8-bit PNG results in a smaller file (2KB vs 4KB) which
should be just as widely compatible with browsers.
And that’s just for the 1x version. I added a new 2x version for “retina” or high-density
displays and a CSS @media query to progressively enhance with this high density
version of the logo. I’ve ensured that this query is supported across browsers by
using vendor-specific versions when necessary. See:
https://caniuse.com/#feat=css-media-resolution
[ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The names are only used in the Guides Index overlay and several of them are
longer than they need to be.
For example “Ruby on Rails” is mentioned over and over again in the Release
Notes section although these are obviously all Rails versions we’re listing.
There’s a Maintenance Policy category with a Maintenance Policy article which
is redundant. Policies makes much more sense as a category.
Similarly, Contributing to Ruby on Rails is both a category and an article.
“Contributions” is a better category title. “Ruby on Rails Guides Guidelines” is
a gigantic mouthful. We are *in* the Rails Guides, we don’t need to specify
what guides we’re talking about here.
As a final added advantage, all of these shortenings make the index much easier
to parse in order to find an article.
[ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This notably allows us to tile each category without pushing the page down vertically
as much as we previously did on any viewport wider than mobile sizes.
It also means we can fit more guides which will become useful in the future since
we have several new guides in the work.
Finally the new layout allows three clearly distinct columns to emerge:
- Start Here and Rails basics: Models, Views, Controllers, Other Components
- Digging Deeper, Extending Rails, Contributing, Maintenance
- Release Notes
Having Release Notes shoot back up to the top of the third column is great
because that makes finding the latest released version and its associated
release notes much easier without having to scroll down a bunch.
[ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since #29294, `mattr_acessor` uses kwargs for `instance_reader`,
`instance_writer`, and `instance_accessor` options.
`thread_mattr_accessor` and `config_accessor` also take the same
options, so let's maintain these options handles the same.
|
|\ \ \
| | | |
| | | | |
Remove unnecessary escape character
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
`ruby -ractive_support/core_ext/range/conversions.rb -ep` dies with uninitialized constant ActiveSupport
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
a5b0c60714e1e8d8c182af830a26e1c7c884271d
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If use `run_generator` to run the generator, `--skip-webpack-install`
is specified automatically.
https://github.com/rails/rails/blob/3101a4136bd62787e252d2658eee23001036fa0f/railties/lib/rails/generators/testing/behaviour.rb#L71
However, when executing the generator independently (for example, to use
stub), `webpacker:install` was executed.
Since this includes `yarn install`, it should be avoided in unnecessary
testing.
|
|\ \ \
| |_|/
|/| | |
Add guides section on verbose query logs to Debugging
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since this is a useful tool in debugging it made sense to document
its existence and usage, especially in the console where it's disabled
by default.
[ci skip]
|
| |/
|/|
| |
| |
| | |
If the dev option is specified, Gemfile contains gem which specifies GitHub.
This will take time to execute, so should avoid it in unnecessary tests.
|
|\ \
| | |
| | | |
Make AJ integration tests work in CI
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since `@mutex.synchronize` is enforced in the `ensure_connection!` method,
there is no need to do so on the caller side.
https://github.com/jondot/sneakers/blob/c1b47f9c5d5a95da728bbe1700795790e4efbb12/lib/sneakers/publisher.rb#L22-L26
Due to this, `ThreadError(deadlock; recursive locking)` has occurred.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Also, replace the authentication setting. This is necessary for using
`psql` with PostgreSQL 10.
Ref: https://github.com/travis-ci/travis-ci/issues/9624#issuecomment-389537036
|
| |/ |
|
|\ \
| |/
|/| |
Fix typo in testing guide
|
| | |
|
| |
| |
| |
| | |
in favor of `array.flatten.pack("U*")` and `string.scan(/\X/).map(&:codepoints)`, respectively.
|
|\ \
| |/
|/| |
Fix generated Gemfile missing gems on jruby
|
| | |
|
|/ |
|
|\
| |
| | |
ActiveRecord#respond_to? No longer allocates strings
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is an alternative to https://github.com/rails/rails/pull/34195
The active record `respond_to?` method needs to do two things if `super` does not say that the method exists. It has to see if the "name" being passed in represents a column in the table. If it does then it needs to pass it to `has_attribute?` to see if the key exists in the current object. The reason why this is slow is that `has_attribute?` needs a string and most (almost all) objects passed in are symbols.
The only time we need to allocate a string in this method is if the column does exist in the database, and since these are a limited number of strings (since column names are a finite set) then we can pre-generate all of them and use the same string.
We generate a list hash of column names and convert them to symbols, and store the value as the string name. This allows us to both check if the "name" exists as a column, but also provides us with a string object we can use for the `has_attribute?` call.
I then ran the test suite and found there was only one case where we're intentionally passing in a string and changed it to a symbol. (However there are tests where we are using a string key, but they don't ship with rails).
As re-written this method should never allocate unless the user passes in a string key, which is fairly uncommon with `respond_to?`.
This also eliminates the need to special case every common item that might come through the method via the `case` that was originally added in https://github.com/rails/rails/commit/f80aa5994603e684e3fecd3f53bfbf242c73a107 (by me) and then with an attempt to extend in https://github.com/rails/rails/pull/34195.
As a bonus this reduces 6,300 comparisons (in the CodeTriage app homepage) to 450 as we also no longer need to loop through the column array to check for an `include?`.
|
| |
| |
| |
| | |
Follow up #32146.
|
|\ \
| | |
| | |
| | |
| | | |
Remove index:true option from belongs to as defaults to true.
[ci skip]
|
| | | |
|
|\ \ \
| | | |
| | | | |
Update guide for the counter variable when rendering with the `as:` option
|
| | | |
| | | |
| | | |
| | | | |
[ci skip]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`init_with` and `init_from_db` are almost the same code except decode
`coder`.
And also, named `init_from_db` is a little misreading, a raw values hash
from the database is already converted to an attributes object by
`attributes_builder.build_from_database`, so passed `attributes` in that
method is just an attributes object.
I renamed that method to `init_with_attributes` since the method is
shared with `init_with` to initialize an empty model object.
|
|\ \ \ \
| |/ / /
|/| | | |
Consistently extract checking version for all adapters
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
I don't prefer to extract it for one adapter even though all adapters
also does.
Related to #34227.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use \X meta character directly to get grapheme clusters.
Thanks to @mtsmfm for the tip:
https://github.com/rails/rails/pull/34123#issuecomment-429028878
r? @jeremy
|
|\ \ \ \
| |/ / /
|/| | | |
Fix mapping of content [ci skip]
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Refactored abstract MySQL adapter to support lazy version check.
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Will allow sub classes to override the protected
`#check_version` method hook if desired.
For example, this will be most helpful in sub classes that wish
to support lazy initialization because the version check can
be postponed until the connection is ready to be initialized.
|
|\ \ \ \
| | | | |
| | | | | |
Clarify docs of `ActiveJob::TestHelper` [ci skip]
|