| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix NumericalityValidator on object responding to `to_f`:
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- If you had a PORO that acted like a Numeric, the validator would
work correctly because it was previously using `Kernel.Float`
which is implicitely calling `to_f` on the passed argument.
Since rails/rails@d126c0d , we are now using `BigDecimal` which does
not implicitely call `to_f` on the argument, making the validator
fail with an underlying `TypeError` exception.
This patch replate the `is_decimal?` check with `Kernel.Float`.
Using `Kernel.Float` as argument for the BigDecimal call has two
advantages:
1. It calls `to_f` implicetely for us.
2. It's also smart enough to detect that `Kernel.Float("a")` isn't a
Numeric and will raise an error.
We don't need the `is_decimal?` check thanks to that.
Passing `Float::DIG` as second argument to `BigDecimal` is mandatory
because the precision can't be omitted when passing a Float.
`Float::DIG` is what is used internally by ruby when calling
`123.to_d`
https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/lib/bigdecimal/util.rb#L47
- Another small issue introduced in https://github.com/rails/rails/pull/34693
would now raise a TypeError because `Regexp#===` will just return
false if the passed argument isn't a string or symbol, whereas
`Regexp#match?` will.
|
|\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | | |
MySQL 8.0.14 adds `ER_FK_INCOMPATIBLE_COLUMNS`
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-14.html
> Error messages relating to creating and dropping foreign keys
> were improved to be more specific and informative. (Bug #28526309, Bug #92087)
https://dev.mysql.com/doc/refman/8.0/en/server-error-reference.html
> Error number: 3780; Symbol: ER_FK_INCOMPATIBLE_COLUMNS; SQLSTATE: HY000
> Message: Referencing column '%s' and referenced column '%s' in foreign key constraint '%s' are incompatible.
> ER_FK_INCOMPATIBLE_COLUMNS was added in 8.0.14.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Actionpack typo fixes.
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | | |
2. Typo fixes.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Template Handler Refactoring
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Rather than doing is_a? checks, ask the view object for its compiled
method container. This gives us the power to replace the method
container depending on the instance of the view.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We always want to include this module. It'll be used in production
(maybe)
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This patch removes the instance writer of view_context_class.
Subclasses may override it, but it doesn't need to be written. This
also eliminates the need to cache the return value of the class level
`view_context_class` method.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It's always called with 0 params, so just remove the parameter
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Since everything goes through a `run` method, we can pull the buffer
assignment up.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Methods created by views should always be evaluated against an AV::Base
instance. This way we can extract and refactor things in to classes.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This pulls the "output buffer existence" conditional up. Instead of
evaling the same conditional over and over, we can pull it in to "only
compiled once" Ruby code.
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Replaced webserver with web server
|
| | | | | | |
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
Alias case nodes
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When `Arel` was merged into `ActiveRecord` we lost the ability to alias case nodes. This adds it back.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Fix year value when casting a multiparameter time hash
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When assigning a hash to a time attribute that's missing a year
component (e.g. a `time_select` with `:ignore_date` set to `true`)
then the year defaults to 1970 instead of the expected 2000. This
results in the attribute changing as a result of the save.
Before:
event = Event.new(start_time: { 4 => 20, 5 => 30 })
event.start_time # => 1970-01-01 20:30:00 UTC
event.save
event.reload
event.start_time # => 2000-01-01 20:30:00 UTC
After:
event = Event.new(start_time: { 4 => 20, 5 => 30 })
event.start_time # => 2000-01-01 20:30:00 UTC
event.save
event.reload
event.start_time # => 2000-01-01 20:30:00 UTC
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add Channel tests to `rails stats`
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Rails generates `test/channels`(#34933) and
even allows `rails test:channels` (#34947).
`rails stats` has been providing info about `app/channels`,
it makes sense to add `test/channels` as well.
(I've changed test because we generate `test/channels` with some code)
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | | |
bogdanvlviv/add-missing-entries-to-guides-changelog-file
Add missing entries to guides' changelog file [ci skip]
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We added "Action Mailbox Basics", "Action Text Overview" guides(#34812, #34878)
I think it makes to mention about it in the changelog file. (Similar to 7200ec92f8)
Note that entries retain original author since
I just moved content from readme files to the guides.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix ArgumentError when using S3Service
|
| | |_|/ /
| |/| | | |
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Report statistics for app/mailboxes
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
Update "Development Dependencies Install" guide [ci skip]
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Since we use [workspaces](https://yarnpkg.com/lang/en/docs/workspaces/)
`yarn install` from the root should install all the javascript dependencies.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Since #31230, `change_column` is executed as a bulk statement.
That caused incorrect type casting column default by looking up the
before changed type, not the after changed type.
In a bulk statement, we can't use `change_column_default_for_alter` if
the statement changes the column type.
This fixes the type casting to use the constructed target sql_type.
Fixes #34938.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Enclosing body tag in conductor layout.
|
|/ / / / / |
|
| | | | | |
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Fix that adding attachments lose a body
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
Bump RuboCop to 0.63.0
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
### Summary
RuboCop 0.63.0 has been released.
https://github.com/rubocop-hq/rubocop/releases/tag/v0.63.0
And rubocop-0-63 channel is available in Code Climate.
https://github.com/codeclimate/codeclimate/releases/tag/v0.83.0
Currently, RuboCop version specified for Gemfile.lock (0.61) and
Code Climate (0.60) are different.
- https://github.com/rails/rails/blob/v6.0.0.beta1/Gemfile.lock#L407
- https://github.com/rails/rails/blob/v6.0.0.beta1/.codeclimate.yml#L26
This PR matches these versions to 0.63.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | | |
https://github.com/rails/rails/blob/v6.0.0.beta1/actionview/CHANGELOG.md
[ci skip]
|
| | | | |
|
| | | | |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
activerecord: Fix where nil condition on composed_of attribute
|
|/ / / |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
kamipo/all_of_queries_should_return_correct_result
All of queries should return correct result even if including large number
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since 31ffbf8d, finder methods no longer raise `RangeError`. So
`StatementCache#execute` is the only place to raise the exception for
finder queries.
`StatementCache` is used for simple equality queries in the codebase.
This means that if `StatementCache#execute` raises `RangeError`, the
result could always be regarded as empty.
So `StatementCache#execute` just return nil in that range error case,
and treat that as empty in the caller side, then we can avoid catching
the exception in much places.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently several queries cannot return correct result due to incorrect
`RangeError` handling.
First example:
```ruby
assert_equal true, Topic.where(id: [1, 9223372036854775808]).exists?
assert_equal true, Topic.where.not(id: 9223372036854775808).exists?
```
The first example is obviously to be true, but currently it returns
false.
Second example:
```ruby
assert_equal topics(:first), Topic.where(id: 1..9223372036854775808).find(1)
```
The second example also should return the object, but currently it
raises `RecordNotFound`.
It can be seen from the examples, the queries including large number
assuming empty result is not always correct.
Therefore, This change handles `RangeError` to generate executable SQL
instead of raising `RangeError` to users to always return correct
result. By this change, it is no longer raised `RangeError` to users.
|