- 03 2月, 2015 10 次提交
-
-
由 Holger Frohloff 提交于
Changes a call to #map and a subsequent call to #flatten to the more idiomatic version of #flat_map. This commit also removes an unnessecary return statement.
-
由 Abdelkader Boudih 提交于
Fix AM#Dirty introduction example
-
由 Vipul A M 提交于
Added simple initialize and made use of Person.new instead of Person.find_by to clarify the docs. [ci skip]
-
由 Sean Griffin 提交于
Consistent foreign key name generation
-
由 Chris Sinjakli 提交于
-
由 Sean Griffin 提交于
A typo fix and a small clarification on `autoload_paths`
-
由 Sean Griffin 提交于
Fixes #18787.
-
由 jafrog 提交于
-
由 Sean Griffin 提交于
`attributes_to_define_after_schema_loads` better describes the difference between `attribute` and `define_attribute`, and doesn't conflate terms since we no longer differentiate between "user provided" and "schema provided" types.
-
由 Sean Griffin 提交于
Now that type casting has nothing to do with columns, our only usage of this method is gone.
-
- 02 2月, 2015 18 次提交
-
-
由 Abdelkader Boudih 提交于
Fix typo in Time#change docs
-
由 John Duff 提交于
-
由 Aaron Patterson 提交于
Merge pull request #18612 from eileencodes/fix-validates-on-associated-record-if-parent-is-validate-false Fix validations on child record when record parent has validate: false
-
由 eileencodes 提交于
Fixes #17621. This 5 year old (or older) issue causes validations to fire when a parent record has `validate: false` option and a child record is saved. It's not the responsibility of the model to validate an associated object unless the object was created or modified by the parent. Clean up tests related to validations `assert_nothing_raised` is not benefiting us in these tests Corrected spelling of "respects" It's better to use `assert_not_operator` over `assert !r.valid`
-
由 Andrew White 提交于
The commit 3b637802 re-introduced url helper caching but we need to cache a separate module for Action Mailer without paths.
-
由 Andrew White 提交于
Cache `url_helpers`
-
由 eileencodes 提交于
`url_helpers` used to be memoized. This was lost in a refactoring and this PR adds it back. We noticed this while investigating why integration tests are slower than controller tests.
-
由 Aaron Patterson 提交于
-
由 Will Bryant 提交于
Fix Issue #15549, unbounded memory growth when saving records that have any after_create callbacks (or any associations, which makes after_create callbacks for you)
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
the transaction object shouldn't know so much about active record objects, so let's push the conditionals in to the instance.
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Abdelkader Boudih 提交于
Add note about has_one :through and :dependent
-
由 Matthew Draper 提交于
Update queue_classic gem to use latest
-
由 Aaron Patterson 提交于
Pre-discard flash messages
-
由 Andrew White 提交于
Show proper traces on Windows for the error pages
-
由 Aaron Patterson 提交于
* master: Move required error message and changelog to Active Record Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846 Use Module#include instead of send :include, since now is a public method [ci skip]
✂ warning from controller renderer test Conflicts: activerecord/CHANGELOG.md
-
- 01 2月, 2015 12 次提交
-
-
由 palkan 提交于
-
由 Carlos Antonio da Silva 提交于
The new association error belongs to Active Record, not Active Model. See #18700 for reference.
-
由 Yves Senn 提交于
✂ warning from controller renderer test -
由 Genadi Samokovarov 提交于
This is an issue brought up by @daniel-rikowski in rails/web-console#91. Citing his PR proposal here: > Prior to this, backtrace lines were simply split by a single colon. > > Unfortunately that is also the drive letter delimiter in Windows paths > which resulted in a lot of empty source fragments of "C:0". ("C" from > the drive letter and 0 from "/path/to/rails/file.rb:16".to_i) > > Now the trace line is split by the first colon followed by some digits, > which works for both Windows and Unix path styles. Now, the PR was sent against web-console, because of the templates copy issue we used to had. Instead of bothering the contributor to reopen the issue against upstream Rails itself, I will make sure he gets the credit by putting his name in [rails-contributors/hard_coded_authors.rb][]. [rails-contributors/hard_coded_authors.rb]: (https://github.com/fxn/rails-contributors/blob/master/app/models/names_manager/hard_coded_authors.rb).
-
由 Sean Griffin 提交于
Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846
-
由 Mingdong Luo 提交于
Fix n+1 query problem when eager loading nil associations (fixes #18312)
-
由 Sean Griffin 提交于
Use Module#include instead of send :include, since Module#include is a public method [ci skip]
-
由 Mingdong Luo 提交于
Conflicts: activerecord/CHANGELOG.md
-
-
由 Sean Griffin 提交于
It's finally finished!!!!!!! The reason the Attributes API was kept private in 4.2 was due to some publicly visible implementation details. It was previously implemented by overloading `columns` and `columns_hash`, to make them return column objects which were modified with the attribute information. This meant that those methods LIED! We didn't change the database schema. We changed the attribute information on the class. That is wrong! It should be the other way around, where schema loading just calls the attributes API for you. And now it does! Yes, this means that there is nothing that happens in automatic schema loading that you couldn't manually do yourself. (There's still some funky cases where we hit the connection adapter that I need to handle, before we can turn off automatic schema detection entirely.) There were a few weird test failures caused by this that had to be fixed. The main source came from the fact that the attribute methods are now defined in terms of `attribute_names`, which has a clause like `return [] unless table_exists?`. I don't *think* this is an issue, since the only place this caused failures were in a fake adapter which didn't override `table_exists?`. Additionally, there were a few cases where tests were failing because a migration was run, but the model was not reloaded. I'm not sure why these started failing from this change, I might need to clear an additional cache in `reload_schema_from_cache`. Again, since this is not normal usage, and it's expected that `reset_column_information` will be called after the table is modified, I don't think it's a problem. Still, test failures that were unrelated to the change are worrying, and I need to dig into them further. Finally, I spent a lot of time debugging issues with the mutex used in `define_attribute_methods`. I think we can just remove that method entirely, and define the attribute methods *manually* in the call to `define_attribute`, which would simplify the code *tremendously*. Ok. now to make this damn thing public, and work on moving it up to Active Model.
-
由 Aaron Patterson 提交于
changed deleted_tables list to set
-