| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
Travis still don't have a updated version
|
| |
|
| |
|
|\
| |
| | |
Don't catch all NameError to reraise as ActionController::RoutingError
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 6d5b1fdf55611de2a1071c37544933bb588ae88e.
`eager_load` and `references` can include hashes, which won't match up
with `references`
A test case has been added to demonstrate the problem
|
|\ \
| | |
| | |
| | | |
Update seeds.rb.tt
|
|/ /
| |
| |
| | |
Rahm Emanuel doesn't deserve to be in Rails.
|
|\ \
| | |
| | | |
`ActiveRecord::Base#becomes` should copy the errors
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This was changed in 421c81b, as `exists?` blows up if you are eager
loading a polymorphic association, as it'll try to construct a join to
that table. The previous change decided to execute a `count` instead,
which wouldn't join.
Of course, the only time we actually need to perform a join on the eager
loaded values (which would perform a left outer join) is if they're
being referenced in the where clause. This doesn't affect inner joins.
|
|\ \ \
| | | |
| | | | |
Make Parameters#to_h and #to_unsafe_h return HWIA
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This makes these two methods to be more inline with the previous
behavior of Parameters as Parameters used to be inherited from HWIA.
Fixes #21391
|
| |/ /
|/| |
| | |
| | |
| | | |
There was a test remaining for PG only that was checking for an exact
limit clause
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We currently generate an unbounded number of prepared statements when
`limit` or `offset` are called with a dynamic argument. This changes
`LIMIT` and `OFFSET` to use bind params, eliminating the problem.
`Type::Value#hash` needed to be implemented, as it turns out we busted
the query cache if the type object used wasn't exactly the same object.
This drops support for passing an `Arel::Nodes::SqlLiteral` to `limit`.
Doing this relied on AR internals, and was never officially supported
usage.
Fixes #22250.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some backends allow `LIMIT 1,2` as a shorthand for `LIMIT 1 OFFSET 2`.
Supporting this in Active Record massively complicates using bind
parameters for limit and offset, and it's trivially easy to build an
invalid SQL query by also calling `offset` on the same `Relation`.
This is a niche syntax that is only supported by a few adapters, and can
be trivially worked around by calling offset explicitly.
|
|\ \ \
| | | |
| | | | |
Add specific bug reporting guidelines to contributing.md [ci skip]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add boldface and bullets to make more readable.
Make sentences declarative.
Remove "you"s.
|
|\ \ \ \
| |_|/ /
|/| | |
| | | |
| | | | |
yui-knk/add_test_sanitize_sql_array_handles_named_bind_variables
Add test cases for `#sanitize_sql_array` with named_bind_variables
|
| | | |
| | | |
| | | |
| | | |
| | | | |
And add code examples to `sanitize_sql_for_conditions`,
`sanitize_sql_for_assignment`, and `sanitize_sql_array`.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit 9712a7a12b7f9e4dcef751ceda8a73c3f4beb11f, reversing
changes made to 3e65c3d3886336e9145438cdeacaf4ebec6a48b8.
Reverting because this caused test failures and while we have a followup
branch there is still one failure that happens randomly and isn't
straight forward to fix.
|
|\ \ \ \
| | | | |
| | | | | |
travel back
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Controller generators should be creating IntegrationTest stubs instea…
|
| |/ / / /
| | | | |
| | | | |
| | | | | |
ControllerTest
|
|\ \ \ \ \ |
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Allows any Rake task to be run through `bin/rails` such as `bin/rails db:migrate`,
`bin/rails notes` etc.
The Rake tasks are appended to Rails' help output, and blend in as standard commands.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Prevent a 500 in the default controller scaffold
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If you update a record with no attributes, you'll hit a 500 from a guard
in `assign_attributes` raising:
```ruby
ArgumentError: When assigning attributes, you must pass a hash as an argument.
app/controllers/users_controller.rb:44:in `block in update'
app/controllers/users_controller.rb:43:in `update'
test/controllers/users_controller_test.rb:37:in `block in <class:UsersControllerTest>'
```
Not a biggie, but may be quite confusing for the folks new to the
framework.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Update web-console to 3.0.0
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Web Console 3.0.0 is compatible with Rails 5, while the 2.x.x releases
aren't.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The API isn't ready yet, which means we haven't documented it.
People can't make their own commands, so there's no reason to show it
in generated documentation.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix paintIt method in JavaScript guides [ci skip]
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- Changed "paintIt" to "@paintIt" so that it can be called in an on
click handler.
- Closes #22568
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
See the rationale in the comment present in this patch.
|
| |/ / / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Before this commit, the sole presence of the Listen constant
enabled the evented file watcher (unless listen resorted to
the polling backend).
This way, applications may depend on listen for other stuff
independently of this feature. Also, allows teams with mixed
setups to decide at boot time whether the evented watcher
should be enabled for each particular instance.
|
| | | | |
| | | | |
| | | | | |
Tiny typo in the testing guide; articules should be articles.
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Use adapter supports_datetime_with_precision
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
So that it appears correctly in the CHANGELOG on github.
|
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In Rails 5.1 `ActionController::TestCase` will be moved out of Rails
into it's own gem.
Please use `ActionDispatch::IntegrationTest` going foward.
Because this will be moved to a gem I used `# :stopdoc:` instead of
deleting the documentation. This will remove it from the Rails
documentation but still leave the method documented for when we move it
to a gem.
Guides have been updated to use the routing structure used in Integration
and all test examples have been updated to inherit from
`ActionDispatch::IntegrationTest` instead of `ActionController::TestCase.
Fixes #22496
|
|\ \ \ \
| | | | |
| | | | | |
Show redirect response code in assert_response messages
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Follow-up to PR #19977, which helpfully added the redirection path to the error message of assert_response if response is a redirection, but which removed the response code, obscuring the type of redirect.
This PR:
- brings back the response code in the error message,
- updates the tests so the new messages can be tested,
- and adds test cases for the change.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit c2e70ca9b042a3461aac0dc073a80e84bd77eb57, reversing
changes made to b0e5fc2737ed0b2f67f9b9538d01e084545493fd.
this broke the build
|