| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
And we are passing them as separate types in the query, which means 0
precision is still not supported by older versions of MySQL. I also
missed a handful of other cases where they need to be conditionally
applied.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Specifically, versions of MySQL prior to 5.6 do not support this, which
is what's used on Travis by default. The method `mysql_56?` appeared to
only ever be used to conditionally apply subsecond precision, so I've
generalized it and used it more liberally.
This should fix the test failures caused by #20317
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
AR: take precision into count when assigning a value to timestamp
attribute
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Timestamp column can have less precision than ruby timestamp
In result in how big a fraction of a second can be stored in the
database.
m = Model.create!
m.created_at.usec == m.reload.created_at.usec
# => false
# due to different seconds precision in Time.now and database column
If the precision is low enough, (mysql default is 0, so it is always low
enough by default) the value changes when model is reloaded from the
database. This patch fixes that issue ensuring that any timestamp
assigned as an attribute is converted to column precision under the
attribute.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Updated Mime Negotiations docs [ci skip]
|
|/ / / / / / /
| | | | | | |
| | | | | | | |
As we all know that Accessing mime types via constants is deprecated. Now, we are using `Mime::Type[:JSON]` instead of `Mime::JSON`
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
remove warning from Calculations#sum
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This removes the following warning.
```
activerecord/lib/active_record/relation/calculations.rb:74: warning: `&' interpreted as argument prefix
```
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
stop using deprecated method in mailers controller
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Accessing mime types via constants is deprecated.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix arguments of `AR::Calculations#sum`
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Arguments of `#sum` does not match with other shortcuts methods
(count, average, minimum, and maximum).
This commit fix these two points:
* call `super` with only block arguments
First argument of `super` method, `Enumerable#sum`, is `identity`
and first argument of `AR::Calculations#sum` is `column_name`.
`Enumerable#sum` does not expect `column_name` to be passed.
* Change first argument of `sum` from array arguemnt to single
argument to match other shortcuts methods. When `sum` accept
array arguemnt, user can pass multi arguments and an exception is
raised from `calculate`.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Remove leading slash from path
|
| | |_|_|/ / / / /
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The leading slash denotes an absolute path,
rather than a relative one (which is more popular)
[ci skip]
|
|\ \ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
Remove not used argument `table_name` of `sanitize_sql_for_conditions`
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This argument was needen when `sanitize_sql_for_conditions` internally
called `sanitize_sql_hash_for_conditions`.
But `sanitize_sql_hash_for_conditions` was deprecated
(https://github.com/rails/rails/commit/eb921000a11bc87a3b001164fc367b84aee584c5)
and deleted
(https://github.com/rails/rails/commit/3a59dd212315ebb9bae8338b98af259ac00bbef3)
(https://github.com/rails/rails/commit/4bd089f1d93fa168b0ae17dd8c92a5157a2537d7).
|
|\ \ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
Add tests for sanitize named bind arity
|
|/ / / / / / / / |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The flash middleware shouldn't know how to look up the session object.
Just ask the request for that information.
|
| |/ / / / / /
|/| | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We can know whether or not there is a content type object, and just exit
early. There is no need to `try` so hard.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Added assertion for error messages for nil and unknown delivery methods
|
| | | | | | | |
| | | | | | | |
| | | | | | | | |
As `deliver_now` `RuntimeError` for both nil & unknown delivery method so it’s good to have assertion for error messages
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
introduce `conn.data_source_exists?` and `conn.data_sources`.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
These new methods are used from the Active Record model layer to
determine which relations are viable to back a model. These new methods
allow us to change `conn.tables` in the future to only return tables and
no views. Same for `conn.table_exists?`.
The goal is to provide the following introspection methods on the
connection:
* `tables`
* `table_exists?`
* `views`
* `view_exists?`
* `data_sources` (views + tables)
* `data_source_exists?` (views + tables)
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Update i18n.md [ci skip]
|
|/ / / / / / / / / |
|
| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| |_|_|/ / / / / /
|/| | | | | | | | |
Removed mocha from Railites PluginGeneratorTest
|
| | | | | | | | | |
|
| | | | | | | | | |
|
|/ / / / / / / / |
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
Update routing.md
|
|/ / / / / / / |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We should not run MysqlAdapter tests when running with `sqlite3_mem`.
This also moves the test-case outside the MysqlAdapter namespace. This
will prevent the following error when running everything:
```
1) Error:
TestAdapterWithInvalidConnection#test_inspect_on_Model_class_does_not_raise:
TypeError: superclass mismatch for class MysqlAdapter
```
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | |
| | | | | | | |
Check mysql structure_load for errors
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
structure_dump consistent
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Correcting output of `file_field` with `multiple` attribute option [ci skip]
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Added Examples in docs for internal behavior of Array#to_formatted_s [ci skip]
|
| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Correcting output of `number_to_percentage` example in `number_helper…
|
| | |/ / / / / / /
| |/| | | | | | |
| | | | | | | | | |
Here is correct output of `number_to_percentage(100, format: "%n %”)`
|
|\ \ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
Fix a typo: Mime::Types should be Mime::Type [ci skip]
|
|/ / / / / / / / |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Added assertion for error messages for redirection to nil and params
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
As both `redirect_to_nil` and `redirect_to_params` are raising same `ActionController::ActionControllerError` so it’s good to assert error messages as well
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Synonyms are always a list of strings, and we have access to the
internal string representation, so we can avoid allocating new arrays.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Now that `all` has it's own object, we don't need the html_types Set.
|
| | | | | | | | | |
|