aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/treasure.rb
Commit message (Collapse)AuthorAgeFilesLines
* modernizes hash syntax in activerecordXavier Noria2016-08-061-2/+2
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-1/+1
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Add tests for associations without counter_cacheTristan Gamilis2015-04-091-0/+1
| | | | | Assert that counter_cache behaviour is not used on belongs_to or has_many associations if the option is not given explicitly.
* Don't redefine autosave association callbacks in nested attrsSean Griffin2015-01-281-0/+1
| | | | | | | | These callbacks will already have been defined when the association was built. The check against `reflection.autosave` happens at call time, not at define time, so simply modifying the reflection is sufficient. Fixes #18704
* Obey `validate: false` option for habtmCarlos Antonio da Silva2014-03-141-0/+1
| | | | Fixes #14383.
* Accept belongs_to assoc. keys in ActiveRecord queriesbeerlington2012-09-111-0/+3
| | | | | | | | | | | | | Allows you to specify the model association key in a belongs_to relationship instead of the foreign key. The following queries are now equivalent: Post.where(:author_id => Author.first) Post.where(:author => Author.first) PriceEstimate.where(:estimate_of_type => 'Treasure', :estimate_of_id => treasure) PriceEstimate.where(:estimate_of => treasure)
* Raise an exception with friendlier error message when attempting to build a ↵Mike Breen2009-09-121-0/+2
| | | | | | polymorphic belongs_to with accepts_nested_attributes_for. [#2318 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Fix has_many :through a polymorphic has_many. Closes #10529 [Aleksey ↵Jeremy Kemper2008-02-021-0/+2
| | | | | | Kondratenko] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* move assets and modelsJeremy Kemper2008-01-181-0/+4
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de