| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The existing example seems somewhat forced: is it realistic
to have a model that accepts state in its initializer but
considers it has not been changed? By allowing state changes
to happen only via accessors it seems more natural that new
instances are considered to be unchanged (as they are in AR).
[ci skip]
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Use SCHEMA instead of DB_STRUCTURE for specifiying structure file.
Conflicts:
activerecord/CHANGELOG.md
|
| |
| |
| |
| |
| | |
`rake test:load_structure` already uses `SCHEMA` and there's no
need to maintain two different env vars.
|
|\ \
| | |
| | | |
Fix `test_types_line_up` when column type missing
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
a column type `xml` is missing in regexp pattarn. However,
`assert_equal 1, lengths.uniq.length` is success when `lengths` are all
`nil` because a column type is missing. a test will be failed by using
`compact` when a column type is missing.
|
|\ \ \
| | | |
| | | | |
Extracted silence_stream method to new module in activesupport/testing
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Added include for the same in ActiveSupport::Test.
- Removed occurrences of silence_stream being used elsewhere.
- Reordered activesupport testcase requires alphabetically.
- Removed require of silence stream from test_case
- Moved quietly method to stream helper
- Moved capture output to stream helper module and setup requires for the same elsewhere
|
|\ \ \ \
| | | | |
| | | | | |
Migrating xhr methods to keyword arguments syntax
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
in `ActionController::TestCase` and
`ActionDispatch::Integration`
Old syntax:
`xhr :get, :create, params: { id: 1 }`
New syntax example:
`get :create, params: { id: 1 }, xhr: true`
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Also remove the default value since it will be always passed and
Array(nil) returns an empty array
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Rename AS::Callback#merge
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Renamed it to indicate what it actually does.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This will make rake test_sqlite3_mem work again
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
They are implementation details
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Deprecated finders are not supported anymore
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
Closes #18646
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
call is too generic
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Thse methods are used only inside this class
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The `model_name` method should be called on `to_model`
|
| | | | | | | | |
|
| | | | | | | | |
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Thor isn't very discerning over whether some content is present when passed
to `inject_into_file`, e.g. a commented out route is detected as being present.
So to prevent people scratching their heads as to why a route hasn't appeared
it's better to fall on the side of having duplicate routes.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
because the partial renderer would not create an lvar per each template since c67005f221f102fe2caca231027d9b11cf630484
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
config_accessor should better not be a public method, as with Ruby's attr_accessor
|
|/ / / / / / / |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We're about a year a way from either project releasing, their
development doesn't need to break our builds for now.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fix transaction rollback in case of aborting thread
|
|/ / / / / / / |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
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]
|