| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When trying to checkout connection from connection pool,
checkout()(and checkout_and_verify) verify whether the connection
is active or not.
And, if the connection is not active, connection adapters try to
reconnect to server. And, if database is down at this moment,
reconnect fails and exception is raised.
(Ex: Mysql2::Error: Can't connect to local MySQL server through socket xxx)
But, ConnectionPool does not catch the exception, but leaks current
disconnected connection to @connection.
So, if database's temporary down happens several times and exceeds
the number of connection pool(5 by default), activerecord will be
no more available, even if database server is already recovered.
This patch fix it by catching exception and releasing connection.
|
|\
| |
| | |
remove *_filter
|
|/ |
|
|\
| |
| | |
Add test case and documentation for skip_before_filter.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The new test/docs further explain the conflicts that can happen when
mixing `:if`/`:unless` options with `:only`/`:except` options in
`skip_before_action`.
The gist is that "positive" filters always have priority over negative
ones.
The previous commit already showed that `:only` has priority over `:if`.
This commit shows that `:if` has priority over `:except`.
For instance, the following snippets are equivalent:
```ruby
skip_before_action :some_callback, if: -> { condition }, except: action
```
```ruby
skip_before_action :some_callback, if: -> { condition }
```
|
| |
| |
| |
| |
| |
| |
| |
| | |
Test case for using skip_before_filter with the options :only and :if
both present. In this case, the :if option will be ignored and :only
will be executed.
Closes #14549 (the commit was cherry-picked from there).
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Add prepend option to protect_from_forgery.
|
|/ / |
|
|\ \
| | |
| | | |
Remove ActionController::HideActions (closes #18336)
|
| | | |
|
| |/
|/|
| |
| | |
https://github.com/rails/rails/commit/5937bd02dee112646469848d7fe8a8bfcef5b4c1#commitcomment-9205786
|
|\ \
| | |
| | | |
Enqueued email assertions
|
| | | |
|
|/ / |
|
| | |
|
|\ \
| | |
| | | |
Add :only option to assert_enqueued_jobs
|
|/ /
| |
| |
| | |
With the option, assert_enqueued_jobs will check the number of times a specific kind of job is enqueued.
|
|\ \
| | |
| | | |
Fix potenital infinite recursion in changed_for_autosave?
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When associations checked for autosave have a cycle, and
none of them is dirty, then changed_for_autosave? will be an
infinite loop. We now remember if we're in the check and
will short circuit the recursion.
|
|\ \ \
| | | |
| | | | |
Fix count on a separate connection
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previosly count and other AR calculations would convert
column_name_for_operation to sql on a default Arel::Table.engine
(AR::Base) connection. That could lead to trouble if current
model has a connection to a different adapter or Base connection
is inaccessible.
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
shunsukeaida/avoid_orm_being_humanized_in_generator_help_message
Overwrite descriptions generated by Generators::Base to respect acronym.
|
| | | | |
| | | | |
| | | | |
| | | | | |
hook_for
|
| |/ / /
|/| | | |
|
|\ \ \ \
| |_|_|/
|/| | | |
Add _mailer suffix to generated file names.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Following the same naming convention used in
controllers and jobs.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The build has failed when running the date/time ext tests in isolation
due to the missing extension, so better than adding a require is using
just Ruby in this case.
https://travis-ci.org/rails/rails/jobs/46107954#L1077
|
|\ \ \ \
| | | | |
| | | | | |
fix `attribute` method scoping(i.e. private)
|
| | | | |
| | | | |
| | | | |
| | | | | |
ref #52f641264b1325a4c2bdce7971b14524bd4905f1
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Changing sets -> set [ci-skip]
|
|/ / / / /
| | | | |
| | | | | |
Updating some minor grammar issue.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Add #weekend?, #next_weekday, and #prev_weekday methods to Date, Time, and DateTime
|
| | | | |
| | | | |
| | | | |
| | | | | |
Date, Time, and DateTime
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
and DateTime
`#on_weekend?` returns true if the receiving date/time falls on a Saturday or
Sunday.
`#next_weekday` returns a new date/time representing the next day that does
not fall on a Saturday or Sunday.
`#prev_weekday` returns a new date/time representing the previous day that
does not fall on a Saturday or Sunday.
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Add log_level options to configuration guide
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
replacing 'attribute' method with an alias
|
| |/ / / |
|
|\ \ \ \
| | | | |
| | | | | |
Fixed typos and wording in ActiveRecord CHANGELOG [ci skip]
|
|/ / / / |
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | |
| | | | |
prathamesh-sonpatki/add-test-for-non-string-labeled-fixtures
Fix lookup of fixtures with non-string(like Fixnum) label
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Fixtures with non-string labels such as integers should be accessed
using integer label as key. For eg. pirates(1) or pirates(42).
- But this results in NotFound error because the label is converted into string before
looking up into the fixtures hash.
- After this commit, the label is converted into string only if its a
symbol.
- This issue was fount out while adding a test case for
https://github.com/rails/rails/commit/7b910917.
|
|\ \ \
| | | |
| | | | |
Improve protect_from_forgery documentation.
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
removing unecessary default parameter in private method
|
| | | | |
| | | | |
| | | | |
| | | | | |
'_singularize' only ever gets called with one argument
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Documenting 'remove_possible_method' and 'redefine_method' [ci skip]
|