| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Eventually I want to eliminate the FakeSet test class
|
|
|
|
|
| |
I'm going to reimplement this using route objects, so it will be easier
if we just change ast access to go through a method rather than hashes
|
|
|
|
| |
we don't need to keep adding it and deleting if from hashes.
|
|
|
|
|
| |
Eventually I want to pull up AST generation so that we don't have to add
it to the `conditions` hash.
|
|\
| |
| | |
Add method_source dependency to activesupport
|
| | |
|
| |
| |
| |
| | |
We already have rake install command that does the same thing.
|
|\ \
| | |
| | |
| | |
| | | |
ixkaito/version_is_needless_when_running_installrb
Remove `version` argument in install.rb
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Fix middleware deprecation message. Related to #21172.
|
|/ / |
|
|\ \
| | |
| | | |
[ci skip] SQL is written using statements, not sentences
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
It just constructs a Path::Pattern object with the AST that it already
has
|
| | |
| | |
| | |
| | |
| | | |
This was a useless object. We can just directly construct a
Path::Pattern object without a Strexp object.
|
| | |
| | |
| | |
| | |
| | | |
the caller already has it, there is no reason to pack it in to an object
and just throw that object away.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
we always pass all parameters, so there is no reason to provide default
arguments.
|
| | | |
|
| | |
| | |
| | |
| | | |
the caller already has access to `as`, so we can stop passing it around.
|
| | |
| | |
| | |
| | |
| | |
| | | |
the same value that is extracted from the options hash earlier is
returned, so we don't need to pass it in in the first place. The caller
already has the data, so stop passing it around.
|
| | |
| | |
| | |
| | |
| | | |
this way we don't have to mutate the options hash so far away from where
the user passed it in
|
|\ \ \
| | | |
| | | |
| | | | |
Require explicit counter_cache option for has_many
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Assert that counter_cache behaviour is not used on belongs_to or
has_many associations if the option is not given explicitly.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously has_many associations assumed a counter_cache was to be used
based on the presence of an appropriately named column. This is
inconsistent, since the inverse belongs_to association will not make
this assumption. See issues #19042 #8446.
This commit checks for the presence of the counter_cache key in the
options of either the has_many or belongs_to association as well as
ensuring that the *_count column is present.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The `anchor` parameter [is overridden](https://github.com/rails/rails/blob/b4b4a611d0eb9aa1c640c5f521c6a43bf2a65bab/actionpack/lib/action_dispatch/routing/mapper.rb#L1528) unless it
is directly passed to `match`, so setting it in a scope must be a
mistake.
|
|\ \ \ \
| |_|/ /
|/| | | |
Prevent duplicating `where` clauses
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
class
Fixes #19528
fix for mysql2 test
better test
|
| | | |
| | | |
| | | |
| | | | |
Closes #21201.
|
|\ \ \ \
| | | | |
| | | | | |
How to pass arguments to ActiveJob Jobs [ci skip]
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
A section explaining how to pass arguments to Jobs has been added.
[ci skip] How to pass arguments to ActiveJob Jobs
Removed the "how to pass arguments" from what you will know section
[ci skip] improving Enqueue Job section
Using GuestsCleanupJob rather than MyJob for coherence.
[ci skip] Passing args section merged with enqueuing jobs
Passing args is now explained through examples withing Enqueuing the Jobs section
[ci skip] Unnecessary example removed
[ci skip] Typo fixed (missing as)
|
|\ \ \ \ \
| | | | | |
| | | | | | |
[ci skip] Clarified asset pipeline guide
|
|/ / / / / |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The latest, currently unreleased, version of queue_classic is required
for this to work. See
https://github.com/QueueClassic/queue_classic/pull/262 for more details.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Added helper methods to stub any instance
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
As described in the "Follow Coding Conventions" section in our
contribution guide (http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)
we favor `assert_not` over `refute`.
While we don't usually make stylistic changes on it's own I opted to do
it in this case. The reason being that test cases are usually copied as
a starting point for new tests. This results in a spread of `refute` in
files that have been using it already.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Assert that the `:prefix` option of `number_to_human_size` is deprecated
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Replace the giant comment in routes.rb with a link to the guides
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This comment not only serves no purpose, but in my experience is
actively detrimental to new developers getting started with Rails.
Expereinced developers just end up deleting this comment, and are
annoyed that they had to take this step. I also spend a lot of time
mentoring brand new developers, and a consistent theme I've seen is that
this comment just ends up intimidating them, and making them think it's
dangerous to edit this file.
One of my students just said this (due to the number of comments which
even new developers don't actually read, they just see it as a sign that
this thing is "dangerous").
> I don't edit any file that Rails generates for me, until my instructor
> says that it's OK to do so.
Realistically, this comment adds 0 value. We have very good
documentation, which we can just link to instead. If someone is truly
new enough to benefit from this info, they presumably just ran `gem
install rails`, and have an internet connection that they can use to
read the routing guide.
The choice of language here was very specific. I chose "the DSL
available" over "what is possible", because a consistent theme I've
noticed among my students is that they aren't aware that this is
actually a Ruby file, and can write any Ruby code here that they want.
This file is not the only offender, but is by far the biggest point of
pain that I've seen, and felt it was a good spot to open this
discussion.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
[ci skip] Documentation: Switch around a common phrase for readability
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
I didn't like this method because it mutates the parameters. Now that
the method is so small, just push it up to `initialize`
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
If the through class has default scopes we should skip the statement
cache.
Closes #20745.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
now the `@defaults` variable doesn't need to be set before calling
`normalize_defaults`
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
These three options are stored in the `scope` chain outside of the
options hash. If they are in the options hash, then someone passed them
in to `match` and they don't really do anything. So lets remove the
code.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
remove `format` from the options hash in the scope chain so that we
don't need to remove it later
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
this reduces the number of times we have to mutate the options hash.
|