| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
[ci skip] Added documentation for belongs_to scope parameter
|
| | |
|
|\ \
| | |
| | | |
Correctly determine if migration is needed.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This method would assume that if last migration in the migrations
directory matched the current schema version, that the database was up
to date, but this does not account for new migrations with older
timestamps that may be pending.
|
| | |
| | |
| | |
| | | |
`strip_heredoc` method is defined on active_support/core_ext/string
|
| | |
| | |
| | |
| | | |
config.active_record.raise_in_transactional_callbacks
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
seamusabshere/numerify-pool-checkout-timeout-from-urls-4-1-stable
Make sure :checkout_timeout and :dead_connection_timeout are numbers
Conflicts:
activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The instance var is already saved as a string in the initialization
method of AssociationReflection.
See https://github.com/rails/rails/blob/master/activerecord/lib/active_record/reflection.rb#L273
|
| | | |
|
| | |
| | |
| | |
| | | |
Fixes #15821.
|
|\ \ \
| | | |
| | | | |
Add option to stop swallowing errors on callbacks.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently, Active Record will rescue any errors raised within
after_rollback/after_create callbacks and print them to the
logs. Next versions of rails will not rescue those errors anymore,
and just bubble them up, as the other callbacks.
This adds a opt-in flag to enable that behaviour, of not rescuing
the errors.
Example:
# For not swallow errors in after_commit/after_rollback
config.active_record.errors_in_transactional_callbacks = true
[fixes #13460]
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the request parameters are passed to create_with and where they can
be used to do mass assignment when used in combination with
Relation#create.
Fixes CVE-2014-3514
Conflicts:
activerecord/lib/active_record/relation/query_methods.rb
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
byroot/add-test-case-for-nested-array-in-where-conditions
Add a test case of nested empty array values in conditions
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Post.where(id: [[]]).to_a
Used to fail with a SQL syntax error (until 4.1):
SELECT ... WHERE id in ();
It now properly generate:
SELECT ... WHERE 1=0;
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Use #model_name on instances instead of classes
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This allows rails code to be more confdent when asking for a model name, instead of having to ask for the class.
Rails core discussion here: https://groups.google.com/forum/#!topic/rubyonrails-core/ThSaXw9y1F8
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add a `required` option to the model generator
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Syntax was chosen to follow the passing of multiple options to
decimal/numeric types. Curly braces, and allowing any of `,`, `.`, or
`-` to be used as a separator to avoid the need for shell quoting. (I'm
intending to expand this to all columns, but that's another PR.
The `required` option will cause 2 things to change. `required: true`
will be added to the association. `null: false` will be added to the
column in the migration.
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Change the default `null` value for timestamps
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
As per discussion, this changes the model generators to specify
`null: false` for timestamp columns. A warning is now emitted if
`timestamps` is called without a `null` option specified, so we can
safely change the behavior when no option is specified in Rails 5.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Update, unify, encapsulate, and fix various code tools in Rails
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
[ci skip]
|
|\ \ \ \ \ \ \ \
| |_|_|_|_|/ / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fixed issue w/custom accessors + reserved name + inheritance
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fixed an issue where custom accessor methods (such as those generated by
`enum`) with the same name as a global method are incorrectly overridden
when subclassing.
This was partially fixed in 4155431 then broken again by e5f15a8.
Fixes #16288.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
WARNING: don't use them! They might change or go away between future beta/RC/
patch releases!
Also added a CHANGELOG entry for this.
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Implement `==` on `Type::Value` and `Attribute`
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This was a small self contained piece of the refactoring that I am
working on, which required these objects to be comparable.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
after_commit should not run in nested transactions, however they should
run once the outermost transaction gets committed. This patch fixes the
problem copying the records from the Savepoint to its parent. So the
RealTransaction will have all records that needs to run callbacks on it.
[fixes #16425]
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Use `commit_transaction`/`rollback_transaction` on
`within_new_transaction` method, so they make sure they `pop` the
transaction from the stack before calling the methods `commit`/`rollback`.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Follow up to the discussion on #16505.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Use the method for determining attribute methods rather than duplicating
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
I've been trying to reduce the number of places that care about
`attributes`, and its existence. We have a method for this check, let's
use it instead.
|
| | | | | | | | | |
|
|/ / / / / / / / |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
[ci skip] updated 'where' in association documention to new style syntax
|
| | |_|_|_|_|_|/
| |/| | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Looks like #first wasn't warm enough...
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
[Regression 4.0 -> 4.1] Fixed AR::Relation#where edge case with Hash and other Relation
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Example:
Author.where(posts: { author_id: Author.where(country_id: 1) }).joins(:posts)
|
| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
greyblake/dont_write_timestamps_if_they_are_not_attributes
Write timestamps only if there are timestamps columns
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|