Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | start could be a string | Santiago Pastorino | 2012-09-21 | 1 | -1/+1 | |
| | | | | | Related to 761bc751d31c22e2c2fdae2b4cdd435b68b6d783 and eb876c4d07130f15be2cac7be968cc393f959c62 | |||||
* | Revert "Fix find_in_batches with customized primary_key" | Santiago Pastorino | 2012-09-21 | 1 | -7/+6 | |
| | | | | | | | This reverts commit 761bc751d31c22e2c2fdae2b4cdd435b68b6d783. This commit wasn't fixing any issue just using the same table for different models with different primary keys. | |||||
* | rename AR::Model::Tag to AR::Tag - fixes #7714 | Francesco Rodriguez | 2012-09-20 | 1 | -1/+1 | |
| | ||||||
* | fix querying with an empty hash | Damien Mathieu | 2012-09-19 | 1 | -2/+6 | |
| | | | | Closes #6960 | |||||
* | Fix find_in_batches with customized primary_key | Toshiyuki Kawanishi | 2012-09-16 | 1 | -6/+7 | |
| | ||||||
* | Pass in the model class rather than engine | Jon Leighton | 2012-09-13 | 2 | -6/+6 | |
| | | | | | | | | | In some circumstances engine was Arel::Table.engine which for separate reasons was an ActiveRecord::Model::DeprecationProxy, which caused a deprecation warning. In any case, we want the actual model class here, since we want to use it to infer information about associations. | |||||
* | Refactor to remove some duplication | Jon Leighton | 2012-09-12 | 1 | -37/+20 | |
| | ||||||
* | Fix nested association references | Jon Leighton | 2012-09-12 | 1 | -3/+4 | |
| | | | | | Previously the reflection would be looked up on the wrong class. However the test passed because the examples referred back to themselves. | |||||
* | Accept belongs_to assoc. keys in ActiveRecord queries | beerlington | 2012-09-11 | 2 | -4/+66 | |
| | | | | | | | | | | | | | 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) | |||||
* | Fix pluck when columns/tables are reserved words. | Ian Lesperance | 2012-09-05 | 1 | -1/+1 | |
| | ||||||
* | Model.select takes a variable list of arguments. | Isaac Sanders | 2012-08-23 | 1 | -11/+12 | |
| | | | | | | This is a cleaner version of #6916. Closes #3165. | |||||
* | Fix "last equality wins" logic in relation merge | Ernie Miller | 2012-08-19 | 1 | -10/+5 | |
| | | | | | | This is a real fix (as compared to the band-aid in b127d86c), which uses the recently-added equality methods for ARel nodes. It has the side benefit of simplifying the merge code a bit. | |||||
* | Fix merge error when Equality LHS is non-attribute | Ernie Miller | 2012-08-17 | 1 | -2/+5 | |
| | | | | | | | | | This is at best a band-aid for a more proper fix, since it won't truly handle the removal of the previous equality condition of these other nodes. I'm planning to put in some work on ARel toward supporting that goal. Related: rails/arel#130, ernie/squeel#153, ernie/squeel#156 | |||||
* | Allow Relation#merge to take a proc. | Jon Leighton | 2012-08-03 | 1 | -2/+13 | |
| | | | | | | | | | | | | | | | | | | This was requested by DHH to allow creating of one's own custom association macros. For example: module Commentable def has_many_comments(extra) has_many :comments, -> { where(:foo).merge(extra) } end end class Post < ActiveRecord::Base extend Commentable has_many_comments -> { where(:bar) } end | |||||
* | load active_support/core_ext/module/delegation in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 | |
| | ||||||
* | load active_support/core_ext/object/blank in active_support/rails | Xavier Noria | 2012-08-02 | 6 | -6/+0 | |
| | ||||||
* | AR::Relation#order: make new order prepend old one | Bogdan Gusiev | 2012-07-31 | 2 | -3/+3 | |
| | | | | | | | User.order("name asc").order("created_at desc") # SELECT * FROM users ORDER BY created_at desc, name asc This also affects order defined in `default_scope` or any kind of associations. | |||||
* | Revert "Removing composed_of from ActiveRecord." | Rafael Mendonça França | 2012-07-27 | 1 | -1/+2 | |
| | | | | | | | | | | | This reverts commit 14fc8b34521f8354a17e50cd11fa3f809e423592. Reason: we need to discuss a better path from this removal. Conflicts: activerecord/lib/active_record/reflection.rb activerecord/test/cases/base_test.rb activerecord/test/models/developer.rb | |||||
* | Changelog and doc updates for the previous changes. | Jon Leighton | 2012-07-27 | 1 | -6/+6 | |
| | ||||||
* | Deprecate Relation#all. | Jon Leighton | 2012-07-27 | 2 | -15/+2 | |
| | | | | | | It has been moved to active_record_deprecated_finders. Use #to_a instead. | |||||
* | Deprecate ActiveRecord::Base.scoped. | Jon Leighton | 2012-07-27 | 1 | -1/+1 | |
| | | | | | | | It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders. | |||||
* | improve NullRelation docs [ci skip] | Vijay Dev | 2012-07-21 | 1 | -4/+4 | |
| | ||||||
* | minor copy edits [ci skip] | Vijay Dev | 2012-07-21 | 1 | -1/+1 | |
| | ||||||
* | Add nodocs to delegation module and docs for merge! | Oscar Del Ben | 2012-07-17 | 2 | -1/+2 | |
| | ||||||
* | Update batches docs | Oscar Del Ben | 2012-07-17 | 1 | -6/+6 | |
| | ||||||
* | Add nodoc to HashMerger and Merger | Oscar Del Ben | 2012-07-17 | 1 | -2/+2 | |
| | ||||||
* | Typo | Oscar Del Ben | 2012-07-16 | 1 | -1/+0 | |
| | ||||||
* | Add documentation for query_methods bang methods | Oscar Del Ben | 2012-07-16 | 1 | -1/+20 | |
| | ||||||
* | Add nodoc to create_with_value | Oscar Del Ben | 2012-07-16 | 1 | -1/+1 | |
| | | | | | Reason: all *_value methods are defined dynamically and so don't appear in the documentation. | |||||
* | Add documentation for arel and build_arel | Oscar Del Ben | 2012-07-16 | 1 | -0/+2 | |
| | ||||||
* | Add documentation for create_with | Oscar Del Ben | 2012-07-16 | 1 | -1/+19 | |
| | ||||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-07-15 | 1 | -2/+39 | |
|\ | ||||||
| * | Add docs for having, lock and readonly | Oscar Del Ben | 2012-07-07 | 1 | -0/+12 | |
| | | ||||||
| * | Add doc for joins and improve includes doc | Oscar Del Ben | 2012-07-07 | 1 | -2/+17 | |
| | | ||||||
| * | Add docs for eager_laod and preload | Oscar Del Ben | 2012-07-07 | 1 | -0/+10 | |
| | | ||||||
* | | fix association :extend option | Jon Leighton | 2012-07-13 | 1 | -1/+1 | |
| | | ||||||
* | | support relations created with a table alias | Jon Leighton | 2012-07-13 | 1 | -1/+1 | |
|/ | ||||||
* | minor text change [ci skip] | Vijay Dev | 2012-07-07 | 1 | -1/+1 | |
| | ||||||
* | Revert "Add nodoc to relation methods" | Vijay Dev | 2012-07-07 | 1 | -22/+24 | |
| | | | | | | This reverts commit c47a698d5d497340d4e349257522212173865838. Reason: Let's revert pending further discussions | |||||
* | Add nodoc to relation methods | Oscar Del Ben | 2012-07-06 | 1 | -24/+22 | |
| | ||||||
* | Add order docs | Oscar Del Ben | 2012-07-05 | 1 | -0/+10 | |
| | ||||||
* | Add group documentation | Oscar Del Ben | 2012-07-05 | 1 | -0/+12 | |
| | ||||||
* | Add documentation for includes | Oscar Del Ben | 2012-07-05 | 1 | -0/+11 | |
| | ||||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-06-30 | 1 | -5/+7 | |
|\ | | | | | | | | | Conflicts: activemodel/lib/active_model/errors.rb | |||||
| * | update AR::FinderMethods#exists?(false) example [ci skip] | Francesco Rodriguez | 2012-06-28 | 1 | -5/+7 | |
| | | ||||||
* | | fixing typo in from documentation | Subba Rao Pasupuleti | 2012-06-28 | 1 | -2/+2 | |
| | | ||||||
* | | Use args.flatten! in query methods when applicable | Carlos Antonio da Silva | 2012-06-25 | 1 | -7/+12 | |
| | | | | | | | | | | Try to use more destructive methods on *args when applicable, to avoid creating new objects. | |||||
* | | Merge pull request #6544 from flexoid/issue-6431 | Piotr Sarnacki | 2012-06-25 | 1 | -6/+6 | |
|\ \ | | | | | | | exists?(false) returns false | |||||
| * | | exists?(false) returns false | Egor Lynko | 2012-06-25 | 1 | -6/+6 | |
| | | | | | | | | | | | | `FinderMethods#exists?` finder method now returns *false* with the *false* argument | |||||
* | | | Ensure Arel columns are typecasted properly when grouping with calculation | Carlos Antonio da Silva | 2012-06-25 | 1 | -6/+6 | |
|/ / | | | | | | | Fix build issue with postgresql. |