| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
MySQL doesn't work with foreign keys
|
|/
|
|
|
|
| |
This was previously fixed in e84799d but broken in 3f596f8. This commit
reintroduced the conditional that prevents the foreign keys from being
added to MySQL databases.
|
|\
| |
| | |
Fix test with `add_foreign_key` DSL
|
|/ |
|
|\
| |
| |
| | |
rename primary key sequence only if it exists
|
| | |
|
|\ \
| | |
| | |
| | | |
Always instrument ActiveSupport::Cache
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The current approach is broken because it uses a thread local value
which means on multi-threaded environments it has to be turned on
per thread. Secondly, ActiveSupport::Notifications does not
instrument items when there are not subscribers so this flag is
unnecessary.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | | |
Add always permitted parameters as a configurable option.
[Rafael Mendonça França + Gary S. Weaver]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* General style fixes.
* Add changes to configuration guide.
* Add missing tests.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* This commit adds back the always_permitted_parameters
configuration option to strong paramaters.
* The initial pull requests where this feature was added
are the following:
- https://github.com/rails/rails/pull/12682
- https://github.com/rails/strong_parameters/pull/174
|
|\ \ \ \
| | | | |
| | | | | |
Update documentation for run_callbacks
|
| | | | |
| | | | |
| | | | | |
In some cases run_callbacks will return nil. I'm attempting to update the documentation for the method to clarify.
|
|/ / / / |
|
| | | | |
|
| | | | |
|
| | | | |
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | | |
Leave the note for `ActiveModel`, since it can't yet detect mutations
(hopefully we can change this in time for 4.2). However, we now detect
mutations on all supported types in `ActiveRecord`, so we can note that
`_will_change!` is no longer needed there.
|
| | |
| | |
| | |
| | | |
Closes #15942
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix bug, when ':dependent => :destroy' violates foreign key constraints
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/associations/builder/association.rb
activerecord/lib/active_record/associations/builder/has_one.rb
|
| | | |
| | | |
| | | |
| | | | |
constraints, issue #12380
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Detect in-place modifications on Strings
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
Add AR::Base#valid! method
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Acts same as valid? but raises AR::RecordInvalid exception
if validation fails
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
databases.rake refactoring
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
ActiveRecord#pluck
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It allows the code to be more declarative and elegant.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`ActiveRecord::FixtureSet.create_fixtures` can accept an array of
fixture_files.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Before this commit, if `ENV['FIXTURES_PATH']` was set, then `Rails.root`
was used, otherwise the app used `ActiveRecord::Tasks::DatabaseTasks.root`.
Now it is consistent.
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Stop using instance exec for type decorators
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We are moving this behavior out to an object that we would like to keep
separated from `ActiveRecord::Base`, which means not passing the class
object to it. As such, we need to stop using `instance_exec`, and
instead close over the subclass on global type decorators that are
applied in `Base`.
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Wrap list items to 80 chars and avoid relying on NOTE inside an item
since they are meant to be parsed in paragraphs, not lists.
[ci skip]
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Make the apply_inflections method case-sensitive
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Since d3071db1, the apply_inflections method check if the downcased
version of a string is contained inside the "whitelist" of uncountable
words. However, if the word is composed of capital letters, it won't be
matched in the list while it should.
We can't simply revert to the previous behavior as there is a
performance concern (benchmarked over /usr/share/dict/words):
Before d3071db1 135.610000 0.290000 135.900000 (137.807081)
Since d3071db1 22.170000 0.020000 22.190000 ( 22.530005)
With the patch 22.060000 0.020000 22.080000 ( 22.125771)
Benchmarked with http://git.io/aFnWig
This way, the solution is to put the down-case version of words inside
the @uncountables array.
|
| | | | | | | |
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |_|_|_|_|_|/
|/| | | | | |
| | | | | | | |
Basic support for adding and removing foreign keys
|