Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Rename update_attributes method to update, keep update_attributes as an alias | Amparo Luna + Guillermo Iguaran | 2013-01-03 | 1 | -1/+1 | |
| | ||||||
* | Remove observers and sweepers | Rafael Mendonça França | 2012-11-28 | 1 | -6/+3 | |
| | | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik] | |||||
* | Move initialize_copy method around to let new method / build alias closer | Carlos Antonio da Silva | 2012-11-24 | 1 | -8/+8 | |
| | ||||||
* | 1.9 Syntax related changes | AvnerCohen | 2012-11-10 | 1 | -1/+1 | |
| | ||||||
* | Another batch of hash syntax changes to comment, this time around, I tried ↵ | AvnerCohen | 2012-10-23 | 1 | -5/+5 | |
| | | | | to keep 'output' messages untouched. | |||||
* | nodoc the first_or_create methods and document alternatives | Jon Leighton | 2012-10-19 | 1 | -37/+18 | |
| | ||||||
* | Add Relation#find_or_create_by and friends | Jon Leighton | 2012-10-19 | 1 | -0/+26 | |
| | | | | | | | This is similar to #first_or_create, but slightly different and a nicer API. See the CHANGELOG/docs in the commit. Fixes #7853 | |||||
* | Move two hotspots to use Hash[] rather than Hash#dup | Aaron Patterson | 2012-10-15 | 1 | -3/+5 | |
| | | | | https://bugs.ruby-lang.org/issues/7166 | |||||
* | Remove mass_assignment_options from ActiveRecord | Guillermo Iguaran | 2012-09-16 | 1 | -6/+6 | |
| | ||||||
* | Merge pull request #6606 from amatsuda/ar_relation_model_method | Rafael Mendonça França | 2012-08-21 | 1 | -0/+1 | |
|\ | | | | | AR::Relation#model would be a better API than AR::Relation#klass | |||||
| * | AR::Relation#model would be a better API than AR::Relation#klass | Akira Matsuda | 2012-06-03 | 1 | -0/+1 | |
| | | ||||||
* | | Merge pull request #7133 from roshats/fix_update_all_with_blank_argument | Carlos Antonio da Silva | 2012-08-15 | 1 | -1/+3 | |
|\ \ | | | | | | | | | | Change Relation#update_all with blank argument to raise an ArgumentError instead of trying an update with empty fields. | |||||
| * | | raise ArgumentError if list of attributes to change is empty in update_all | Roman Shatsov | 2012-08-14 | 1 | -1/+3 | |
| | | | ||||||
* | | | load active_support/deprecation 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 | 1 | -1/+0 | |
| | | | ||||||
* | | | Refactor a bit | Jon Leighton | 2012-08-01 | 1 | -38/+37 | |
| | | | | | | | | | | | | | | | This doesn't change the exernal behavior, but it moves some code around to where I think it properly belongs. | |||||
* | | | Add `Relation#load` | Jon Leighton | 2012-08-01 | 1 | -2/+12 | |
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | This method explicitly loads the records and then returns `self`. Rather than deciding between "do I want an array or a relation?", most people are actually asking themselves "do I want to eager load or lazy load?" Therefore, this method provides a way to explicitly eager-load without having to switch from a `Relation` to an array. Example: @posts = Post.where(published: true).load | |||||
* | | minor copy edits [ci skip] | Vijay Dev | 2012-07-21 | 1 | -3/+1 | |
| | | ||||||
* | | Fix typos | Oscar Del Ben | 2012-07-19 | 1 | -3/+3 | |
| | | ||||||
* | | Fix typos and add nodocs to NullRelation | Oscar Del Ben | 2012-07-17 | 1 | -3/+3 | |
| | | ||||||
* | | Improve docs for AR Relation | Oscar Del Ben | 2012-07-17 | 1 | -7/+19 | |
| | | ||||||
* | | Add docs for Relation initialize, create and create! | Oscar Del Ben | 2012-07-16 | 1 | -1/+34 | |
| | | ||||||
* | | Don't link to edgeguides in docs | Oscar Del Ben | 2012-07-16 | 1 | -1/+1 | |
| | | ||||||
* | | Load all records in Relation#inspect | Jon Leighton | 2012-07-07 | 1 | -4/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A test was failing due to the way that Relation#inspect causes association proxies to ignore unsaved records added to the association. This is fixed by simply calling to_a and letting to_a figure out how to get the records (which, in the case of associations, takes into account new records). I think it is acceptable to do this rather than limiting the query at the database level: * It's what we've done in all released Rails versions up to this point * The goal of the limit is to not flood the console with output - this is the problem we're targeting, rather than the actual loading of the records from the database * You probably want to do something with those records later anyway, otherwise you wouldn't have built a relation for them. | |||||
* | | Relation#inspect handles doesn't perform a new query on an already-loaded ↵ | Jon Leighton | 2012-07-07 | 1 | -1/+4 | |
| | | | | | | | | relation | |||||
* | | Simplify Relation#inspect | Jon Leighton | 2012-07-07 | 1 | -12/+3 | |
| | | ||||||
* | | Limit the number of records in Relation#inspect | Damien Mathieu | 2012-07-06 | 1 | -1/+13 | |
| | | | | | | | | While it's interesting to have the results array, it can make a console or a webpage freeze if there are a lot of them. So this limits the number of records displayed in #inspect to 10 and tells how much were effectively found. | |||||
* | | Show the records in Relation#inspect | Jon Leighton | 2012-07-06 | 1 | -0/+4 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason for removing the previous implementation of `#inspect` was that it hid from you that you were dealing with a `Relation` rather than an `Array`. But it is still useful to be able to see the records, particularly if you're writing something like the following in tests: assert_equal [foo], Post.where(:bar) If the assertion fails, you want to see what records were actually loaded. So this implementation makes it clear that you've got a `Relation`, but also shows your records. | |||||
* | | Remove ActiveRelation#inspect | Brian Cardarella | 2012-06-29 | 1 | -4/+0 | |
| | | ||||||
* | | Refactor Relation#update a bit to avoid an extra Enumerator instance | Carlos Antonio da Silva | 2012-06-18 | 1 | -1/+1 | |
|/ | ||||||
* | add explanation of raising errors when a limit scope is supplied in ↵ | Francesco Rodriguez | 2012-05-18 | 1 | -11/+11 | |
| | | | | Relation#delete_all | |||||
* | delete_all raise an error if a limit is provided - fixes #4979 | Francesco Rodriguez | 2012-04-30 | 1 | -0/+2 | |
| | ||||||
* | extract #with_scope and #with_exclusive_scope to ↵ | Jon Leighton | 2012-04-25 | 1 | -1/+4 | |
| | | | | active_record_deprecated_finders | |||||
* | move some of the update_all implementation to active_record_deprecated_finders | Jon Leighton | 2012-04-13 | 1 | -27/+14 | |
| | ||||||
* | now we can just manipulate the values hash in #only and #except | Jon Leighton | 2012-04-13 | 1 | -4/+8 | |
| | ||||||
* | use a hash to store relation values | Jon Leighton | 2012-04-13 | 1 | -15/+12 | |
| | ||||||
* | Make Relation#extending work like other value methods | Jon Leighton | 2012-04-13 | 1 | -3/+4 | |
| | ||||||
* | assert valid keys | Jon Leighton | 2012-04-13 | 1 | -0/+2 | |
| | ||||||
* | Allow Relation#merge to take a hash | Jon Leighton | 2012-04-13 | 1 | -1/+1 | |
| | ||||||
* | we have no need for the ASSOCIATION_METHODS constant | Jon Leighton | 2012-04-13 | 1 | -4/+7 | |
| | ||||||
* | Fix delete_all when chained with joins. | Rafael Mendonça França | 2012-04-10 | 1 | -2/+10 | |
| | | | | Closes #5202 and #919 | |||||
* | Correct description of ['migrated_at > ?', 1.week.ago] from "more than a ↵ | Dave Burt | 2012-03-20 | 1 | -1/+1 | |
| | | | | week ago" to "more recently than a week ago." | |||||
* | relation .present? and .blank? should not query SELECT COUNT(DISTINCT id) | Thiago Almeida | 2012-03-16 | 1 | -0/+4 | |
| | ||||||
* | Remove IdentityMap | Carlos Antonio da Silva | 2012-03-13 | 1 | -10/+1 | |
| | ||||||
* | use bind values for join columns | Aaron Patterson | 2012-02-27 | 1 | -1/+6 | |
| | ||||||
* | prepared statements can be disabled | Aaron Patterson | 2012-02-21 | 1 | -1/+2 | |
| | ||||||
* | let AR::Relation pretty_printed like an Array | Akira Matsuda | 2012-01-21 | 1 | -0/+4 | |
| | ||||||
* | Deprecate inferred JOINs with includes + SQL snippets. | Jon Leighton | 2012-01-16 | 1 | -3/+25 | |
| | | | | | | See the CHANGELOG for details. Fixes #950. | |||||
* | store references as a string | Jon Leighton | 2012-01-16 | 1 | -1/+1 | |
| | ||||||
* | Make referencing an included item trigger eager loading | Jon Leighton | 2012-01-16 | 1 | -1/+2 | |
| |