| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
load "rack/test" before "action_controller/railtie" in bug report templates [ci skip]
|
|/
|
|
| |
[ci skip]
|
|\
| |
| | |
Fix bug causing table creation to fail for models with postgresql 'money' field
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While we query the proper columns, we go through normal handling for
converting the value to a primitive which assumes it should use the
table's primary key. If the association specifies a different value (and
we know that we're working with an association), we should use the
custom primary key instead.
Fixes #18813.
|
| | |
|
|\ \
| |/
|/| |
Fix typo in Creating and Customizing Rails Generators & Templates guide... [ci skip]
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When there is a single scaffold in the routes.rb with no other lines
then revoking/destroying it will create a routes.rb file with a syntax
error. This is because the sentinel for the Thor `route` action didn't
include the newline but the logged route code did.
The fix is to add the newline to the sentinel and remove it from the
the logged route code.
Fixes #15913.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The type from the column is never used, except when being passed to the
attributes API. While leaving the type on the column wasn't necessarily
a bad thing, I worry that it's existence there implies that it is
something which should be used.
During the design and implementation process of the attributes API,
there have been plenty of cases where getting the "right" type object
was hard, but I had easy access to the column objects. For any
contributor who isn't intimately familiar with the intents behind the
type casting system, grabbing the type from the column might easily seem
like the "correct" thing to do.
As such, the goal of this change is to express that the column is not
something that should be used for type casting. The only places that are
"valid" (at the time of this commit) uses of acquiring a type object
from the column are fixtures (as the YAML file is going to mirror the
database more closely than the AR object), and looking up the type
during schema detection to pass to the attributes API
Many of the failing tests were removed, as they've been made obsolete
over the last year. All of the PG column tests were testing nothing
beyond polymorphism. The Mysql2 tests were duplicating the mysql tests,
since they now share a column class.
The implementation is a little hairy, and slightly verbose, but it felt
preferable to going back to 20 constructor options for the columns. If
you are git blaming to figure out wtf I was thinking with them, and have
a better idea, go for it. Just don't use a type object for this.
|
|
|
|
|
|
|
|
|
|
|
| |
The cache name should be converted to a string when given, not compared
as a symbol. This edge case is already adequately covered by our tests,
but was masked by another issue where we were incorrectly updating the
counter cache twice. When paired with a bug where we didn't update the
counter cache because we couldn't find a match with the name, this made
it look like everything was working fine.
Fixes #10865.
|
|
|
|
|
| |
The use of `# :startdoc:` inside of the class was overriding the
outer-most `# :nodoc:`, causing it to be listed in the documented API.
|
|\
| |
| | |
Fix link [ci skip]
|
| | |
|
|\ \
| | |
| | | |
Improve sentence flow in Debugging guide.
|
| |/
| |
| |
| | |
improve sentence flow with grammar change
|
|\ \
| |/
|/| |
Change AS::Testing::TimeHelpers#travel_to to also stub DateTime.now
|
| | |
|
|\ \
| |/
|/| |
Removed magic comments (`# encoding: utf-8`) from tests since it's default from ruby 2 onwards
|
| |
| |
| |
| | |
onwards.
|
|\ \
| | |
| | | |
Small enhancement for generators
|
| | |
| | |
| | |
| | |
| | | |
Changes a call to #map and a subsequent call to #flatten to the more idiomatic
version of #flat_map. This commit also removes an unnessecary return statement.
|
|/ /
| |
| |
| | |
As per Rails general coding conventions. Related to #18794 [ci skip]
|
|\ \
| |/
|/| |
Fix AM#Dirty introduction example
|
|/
|
|
|
|
|
| |
is wrong.
Added simple initialize and made use of Person.new instead of Person.find_by to clarify the docs.
[ci skip]
|
|\
| |
| | |
Consistent foreign key name generation
|
| | |
|
|\ \
| | |
| | | |
A typo fix and a small clarification on `autoload_paths`
|
| | | |
|
| |/
|/|
| |
| | |
Fixes #18787.
|
| |
| |
| |
| |
| |
| |
| | |
`attributes_to_define_after_schema_loads` better describes the
difference between `attribute` and `define_attribute`, and doesn't
conflate terms since we no longer differentiate between "user provided"
and "schema provided" types.
|
|/
|
|
|
| |
Now that type casting has nothing to do with columns, our only usage of
this method is gone.
|
|\
| |
| | |
Fix typo in Time#change docs
|
|/ |
|
|\
| |
| |
| |
| | |
eileencodes/fix-validates-on-associated-record-if-parent-is-validate-false
Fix validations on child record when record parent has validate: false
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #17621. This 5 year old (or older) issue causes validations to fire
when a parent record has `validate: false` option and a child record is
saved. It's not the responsibility of the model to validate an
associated object unless the object was created or modified by the
parent.
Clean up tests related to validations
`assert_nothing_raised` is not benefiting us in these tests
Corrected spelling of "respects"
It's better to use `assert_not_operator` over `assert !r.valid`
|
|
|
|
|
| |
The commit 3b63780 re-introduced url helper caching but we need to
cache a separate module for Action Mailer without paths.
|
|\
| |
| | |
Cache `url_helpers`
|
| |
| |
| |
| |
| |
| | |
`url_helpers` used to be memoized. This was lost in a refactoring and
this PR adds it back. We noticed this while investigating why
integration tests are slower than controller tests.
|
| | |
|
| |
| |
| |
| | |
after_create callbacks (or any associations, which makes after_create callbacks for you)
|
| | |
|
| |
| |
| |
| |
| | |
the transaction object shouldn't know so much about active record
objects, so let's push the conditionals in to the instance.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Add note about has_one :through and :dependent
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Update queue_classic gem to use latest
|