aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/post.rb
Commit message (Collapse)AuthorAgeFilesLines
* Make default_scope work with RelationsPratik Naik2010-01-231-0/+5
|
* Simplify calculation scope building. Remove :order from associations as it ↵Pratik Naik2010-01-181-1/+1
| | | | is troublesome w/ calculation methods using postgresql.
* Rename named_scope to scopePratik Naik2010-01-181-7/+7
|
* Make relations work as scopesPratik Naik2010-01-171-4/+4
|
* Make sure named_scope names are not used as method names alreadyPratik Naik2010-01-171-2/+2
|
* Ensure hm:t#create respects source associations hash conditions [#2090 ↵mattbauer2009-06-211-0/+2
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fixed bug that makes named_scopes _forgot_ current scopeDiego Algorta2009-02-251-0/+6
|
* Make sure inner scope conditions get a preference over the outer onesPratik Naik2009-01-241-0/+6
|
* explicitly including child associations that are also included in the parent ↵Will Bryant2008-10-101-0/+1
| | | | | | | association definition should not result in double records in the collection/double loads (#1110) Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1110 state:committed]
* Fix has_many :through when the source is a belongs_to association. [#323 ↵Zach Dennis2008-10-041-0/+2
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Revert "Add :accessible option to Associations for allowing mass assignments ↵Pratik Naik2008-09-101-6/+0
| | | | | | | | | | | | using hash. [#474 state:resolved]" This reverts commit e0750d6a5c7f621e4ca12205137c0b135cab444a. Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/association_collection.rb
* Add :accessible option to Associations for allowing mass assignments using ↵David Dollar2008-07-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | hash. [#474 state:resolved] Allows nested Hashes (i.e. from nested forms) to hydrate the appropriate ActiveRecord models. class Post < ActiveRecord::Base belongs_to :author, :accessible => true has_many :comments, :accessible => true end post = Post.create({ :title => 'Accessible Attributes', :author => { :name => 'David Dollar' }, :comments => [ { :body => 'First Post!' }, { :body => 'Nested Hashes are great!' } ] }) post.comments << { :body => 'Another Comment' } Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix column collision with named_scope and :joins. [#46 state:resolved]Mark Catley2008-06-221-1/+6
|
* Ensure correct record is returned when preloading has_one where more than ↵Frederick Cheung2008-05-061-0/+2
| | | | | | | one row exists Signed-off-by: Michael Koziarski <michael@koziarski.com> [#73 state:closed]
* Refactor HasManyThroughAssociation to inherit from HasManyAssociation. ↵Pratik Naik2008-04-061-0/+14
| | | | | | Association callbacks and <association>_ids= now work with hm:t. Closes #11516 [rubyruy] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen]Rick Olson2008-03-241-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make dynamic finders respect the :include on HasManyThrough associations. ↵Michael Koziarski2008-02-181-1/+1
| | | | | | Closes #10998. [cpytel] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8890 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce preload query strategy for eager :includes. Closes #9640.Jeremy Kemper2008-01-191-0/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* move assets and modelsJeremy Kemper2008-01-181-0/+59
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de