| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Refactoring `Response#charset=`
|
| | |
|
| |
| |
| |
| |
| |
| | |
By this commit, `#set_header` is called only via
`#set_content_type`. This commit makes the role of
`#charset=` more clear.
|
|\ \
| | |
| | | |
Sync transaction state when accessing primary key
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If a record is modified inside a transaction, it must check the outcome
of that transaction before accessing any state which would no longer be
valid if it was rolled back.
For example, consider a new record that was saved inside a transaction
which was later rolled back: it should be restored to its previous state
so that saving it again inserts a new row into the database instead of
trying to update a row that no longer exists.
The `id` and `id=` methods defined on the PrimaryKey module implement
this correctly, but when a model uses a custom primary key, the reader
and writer methods for that attribute must check the transaction state
too. The `read_attribute` and `write_attribute` methods also need to
check the transaction state when accessing the primary key.
|
|\ \ \
| | | |
| | | | |
Use duktape gem as default JS engine on Windows-MINGW
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The fallback javascript engine on Windows is Windows Script Host (JScript).
However this engine isn't able to process the default assets, because it supports
ES3 only but the coffeescript compiler requires ES5.
Fixes #30014
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since this test changed in 9220935 I noticed that it really doesn't make
sense anymore. I split the tests into 2 groups to explain what each one
does.
First these routes should throw a `bad_request` when the encoding isn't
valid. We're expecting UTF8 encoding and passing binary, that should be
a bad request.
For the second test we are setting the `show` route to set
`self.binary_params_for?` for that route which will convert the
parameters and return a `:ok` instead of a `:bad_request`.
|
|\ \ \ \
| | | | |
| | | | | |
Remove unnecessary `doc` directory deletion
|
| | | | |
| | | | |
| | | | |
| | | | | |
Since 553b695, `doc` directory is not created in application.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit changes the behavior such the path_params now default to
UTF8 just like regular parameters. This also changes the behavior such
that if a path parameter contains invalid UTF8 it returns a 400 bad
request. Previously the behavior was to encode the path params as binary
but that's not the same as query params.
So this commit makes path params behave the same as query params.
It's important to test with a path that's encoded as binary because
that's how paths are encoded from the socket. The test that was altered
was changed to make the behavior for bad encoding the same as query
params. We want to treat path params the same as query params. The params
in the test are invalid UTF8 so they should return a bad request.
Fixes #29669
*Eileen M. Uchitelle, Aaron Patterson, & Tsukuru Tanimichi*
|
|\ \ \ \ \
| | | | | |
| | | | | | |
[ci skip] Fix rails_command comments
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix rubocop issues
|
| | |/ / / /
| |/| | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Remove redundant `unless current_adapter?(:OracleAdapter)`
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
[ci skip]
Closes #30012
|
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | | |
And make reference to `Relation`.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix typo in assert_changes error message
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | |
| | | | | | |
| | | | | | | |
albertoalmagro/set-ruby-version-in-gemfile-and-ruby-version-by-default
Set Ruby version in Gemfile and .ruby-version by default
|
|/ / / / / / |
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
Avoid duplicate clauses when using #or
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Condenses the clauses that are common to both sides of the OR and put them outside, before the OR
This fix the current behavior where the number of conditions is exponential based on the number of times #or is used.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix test directory to correct path
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Together, fix to the following lint violation.
```
rails/actionview/test/ujs/public/test/data-confirm.js
303:11 error Strings must use singlequote quotes
rails/actionview/test/ujs/public/test/data-remote.js
414:32 error Extra semicolon semi
✖ 2 problems (2 errors, 0 warnings)
```
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fix testing helpers that use Action View's capturing helpers (e.g. content_for)
|
| | |/ / / / /
| |/| | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
[ Orhan Toy & Kasper Timm Hansen ]
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fix `warning: method redefined;`
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This fixes the following warning:
```
/tmp/d20170727-7039-kmdtb1/app/app/models/user.rb:5: warning: method redefined; discarding old model_name
rails/activemodel/lib/active_model/naming.rb:222: warning: previous definition of model_name was here
```
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | | |
Change http postgresql.org links to https [ci skip]
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It seems that it accepts only HTTPS connections.
Ref: https://github.com/postgres/postgres/commit/7f77cbd996855a06fb742ea11adbe55c42b48fe2
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
Use frozen string literal in actionpack/
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Building `where_clause` in `UniquenessValidator` is no longer needed
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Building `where_clause` manually was introduced at #26073 to include
both `comparison` and `binds` in `where_clause`. Since 213796f,
`comparison` includes `binds`, so it is enough to use `where` simply.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Use `predicate_builder.build_bind_attribute` wherever possible
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | | |
For less duplicated code.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Rails 5.1 introduce an `ActiveSupport::Duration::Scalar` class as
a wrapper around a numeric value as a way of ensuring a duration
was the outcome of an expression. However the implementation was
missing support for modulo operations. This commit adds support
for those operations and should result in a duration being
returned from expressions involving them.
Fixes #29603 and #29743.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
[ci skip] update routing guide
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
commit 4a3d295f3011e771cddead80de7497ca15d15c13
Author: Yauheni Dakuka <yauheni.dakuka@gmail.com>
Date: Fri Jul 28 14:31:35 2017 +0300
Update routing.md
commit 620a4ce47288e3ef6504290c78f931214968e7e3
Author: Yauheni Dakuka <yauheni.dakuka@gmail.com>
Date: Fri Jul 28 14:19:29 2017 +0300
[ci skip] update routing guide
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
[ci skip] update routing guide
|
|/ / / / / |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We were expecting those classes to be loaded when an association is
defined but they are not.
If you add a debugger on the first line of any of those classes and try
to define the corresponding association you will see that the classes
are not loaded.
Fixes #26273
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix division where a duration is the denominator
|