| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Remove unused argument.
|
|/ |
|
|\
| |
| | |
Fix `ActiveRecord::RecordNotFound` error message with custom primary key
|
| | |
|
|\ \
| | |
| | | |
Reordered classes in AR Validation #validates_with example [ci skip]
|
| | |
| | |
| | |
| | |
| | | |
Person called GoodnessValidator before it was defined.
This change will compile the example correctly.
|
|/ / |
|
|\ \
| | |
| | | |
app_rails_loader.rb should check if bin/rails is a File before calling F...
|
|/ /
| |
| |
| | |
File.read(exe); closes #13825
|
|\ \
| | |
| | | |
Fixes #13810 `rake routes` error when mount `Rails::Engine` with empty routes
|
| | |
| | |
| | |
| | |
| | |
| | | |
fixes rails/rails#13810
Squash
|
|\ \ \
| | | |
| | | | |
Remove unused assignment to fix warnings in enum test.
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
unify param.require tests
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
test boolean and number json param parsing
|
|/ / / |
|
|\ \ \
| |/ /
|/| | |
Fix ActiveModel::Errors#has_key? returning nil
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
From the doc, this method should return false and not nil if there is no errors for this key
|
|\ \ \
| |_|/
|/| | |
Better ActiveRecord hierarchy for Dirty and others
|
| | |
| | |
| | | |
Move serialization dirty into serialization.rb
|
| | | |
|
|\ \ \
| | | |
| | | | |
Remove duplicate merge
|
| | |/
| |/| |
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| |
| | | |
Calling reset on a collection association should unload the assocation
|
| | |
| | |
| | |
| | | |
Need to define #reset on CollectionProxy.
|
|\ \ \
| |/ /
|/| | |
Added missing `file` delivery method to the Configuration Guide
|
| | | |
|
|\ \ \
| | | |
| | | | |
Ensure AR #second, #third, etc. finders work through associations
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit fixes two regressions introduced in cafe31a078 where
newly created finder methods #second, #third, #forth, and #fifth
caused a NoMethodError error on reload associations and where we
were pulling the wrong element out of cached associations.
Examples:
some_book.authors.reload.second
# Before
# => NoMethodError: undefined method 'first' for nil:NilClass
# After
# => #<Author id: 2, name: "Sally Second", ...>
some_book.first.authors.first
some_book.first.authors.second
# Before
# => #<Author id: 1, name: "Freddy First", ...>
# => #<Author id: 1, name: "Freddy First", ...>
# After
# => #<Author id: 1, name: "Freddy First", ...>
# => #<Author id: 2, name: "Sally Second", ...>
Fixes #13783.
|
|/ / / |
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | | |
Implement the Dirty API with the Enum feature correctly.
Conflicts:
activerecord/CHANGELOG.md
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This will make simpler to compare if the values changed in the
save_changed_attribute method.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
To make this possible we have to override the save_changed_attribute
hook.
|
| | |
| | |
| | |
| | | |
This will make easier to hook on this feature to customize the behavior
|
|\ \ \
| | | |
| | | | |
Add missing information for `id` field when used with `select` [ci skip]
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since Rails 4.0, we add an ORDER BY in the `first` method to ensure consistent
results among different database engines. But for singular associations this
behavior is not needed since we will have one record to return. As this
ORDER BY option can lead some performance issues we are removing it for singular
associations accessors.
Fixes #12623.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes a bug where `select(:id)` combined with `joins()` raised:
```
ActiveRecord::StatementInvalid: SQLite3::SQLException: ambiguous column name: id:
SELECT id, authors.author_address_id
FROM "posts"
INNER JOIN "authors"
ON "authors"."id" = "posts"."author_id"
ORDER BY posts.id LIMIT 3
```
The `select_values` are still String and Symbols because other parts (mainly calculations.rb)
rely on that fact.
/cc @tenderlove
|
|\ \ \
| | | |
| | | | |
setup Bundler in engines `bin/rails` stub.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is necessary when bundling gems locally using `BUNDLE_PATH`.
Without this patch `bin/rails` fails with:
```
/Users/senny/.rbenv/versions/2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rails/all (LoadError)
from /Users/senny/.rbenv/versions/2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from bin/rails:7:in `<main>'
```
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Fail early with "Primary key not included in the custom select clause" i...
|
| | |/ /
| |/| |
| | | |
| | | |
| | | | |
find_in_batches
Before this patch find_in_batches raises this error only on second iteration. So you will know about the problem only when you get the batch size threshold.
|