Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Avoid options ever being nil | Jon Leighton | 2012-07-20 | 1 | -4/+4 | |
| | | | | | | | | This fixes active_record_deprecated_finders. | |||||
* | | fix association :extend option | Jon Leighton | 2012-07-13 | 3 | -12/+19 | |
| | | ||||||
* | | move the deprecated options into active_record_deprecated_finders | Jon Leighton | 2012-07-13 | 2 | -5/+2 | |
| | | ||||||
* | | stop using class_attribute where methods/inheritance will suffice. | Jon Leighton | 2012-07-13 | 7 | -29/+53 | |
| | | ||||||
* | | extract deprecated association options to active_record_deprecated_finders | Jon Leighton | 2012-07-13 | 1 | -43/+0 | |
| | | ||||||
* | | Represent association scope options as AR::Relations insternally. | Jon Leighton | 2012-07-13 | 12 | -127/+138 | |
| | | ||||||
* | | Allow associations to take a lambda which builds the scope | Jon Leighton | 2012-07-13 | 3 | -13/+22 | |
| | | ||||||
* | | Improve the derivation of HABTM assocation join table names | Andrew White | 2012-06-22 | 4 | -33/+3 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the derivation of HABTM join table name to take account of nesting. It now takes the table names of the two models, sorts them lexically and then joins them, stripping any common prefix from the second table name. Some examples: Top level models (Category <=> Product) Old: categories_products New: categories_products Top level models with a global table_name_prefix (Category <=> Product) Old: site_categories_products New: site_categories_products Nested models in a module without a table_name_prefix method (Admin::Category <=> Admin::Product) Old: categories_products New: categories_products Nested models in a module with a table_name_prefix method (Admin::Category <=> Admin::Product) Old: categories_products New: admin_categories_products Nested models in a parent model (Catalog::Category <=> Catalog::Product) Old: categories_products New: catalog_categories_products Nested models in different parent models (Catalog::Category <=> Content::Page) Old: categories_pages New: catalog_categories_content_pages Also as part of this commit the validity checks for HABTM assocations have been moved to ActiveRecord::Reflection One side effect of this is to move when the exceptions are raised from the point of declaration to when the association is built. This is consistant with other association validity checks. | |||||
* | | Set the hash value directly instead of using merge! | Carlos Antonio da Silva | 2012-06-21 | 1 | -1/+1 | |
| | | ||||||
* | | Remove unneeded code since pluck is respecting joins now | Rafael Mendonça França | 2012-06-19 | 1 | -12/+1 | |
| | | ||||||
* | | Remove update_attribute. | Steve Klabnik | 2012-06-14 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | Historically, update_attribute and update_attributes are similar, but with one big difference: update_attribute does not run validations. These two methods are really easy to confuse given their similar names. Therefore, update_attribute is being removed in favor of update_column. See the thread on rails-core here: https://groups.google.com/forum/?fromgroups#!topic/rubyonrails-core/BWPUTK7WvYA | |||||
* | | Merge branch 'master-sec' | Aaron Patterson | 2012-05-31 | 1 | -2/+17 | |
|\ \ | | | | | | | | | | | | | | | | * master-sec: Strip [nil] from parameters hash. Thanks to Ben Murphy for reporting this! predicate builder should not recurse for determining where columns. Thanks to Ben Murphy for reporting this | |||||
| * | | predicate builder should not recurse for determining where columns. | Aaron Patterson | 2012-05-30 | 1 | -2/+17 | |
| | | | | | | | | | | | | | | | | | | Thanks to Ben Murphy for reporting this CVE-2012-2661 | |||||
* | | | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-05-30 | 1 | -1/+1 | |
|\ \ \ | ||||||
| * | | | change example on CollectionProxy#delete to accept multiple values | Francesco Rodriguez | 2012-05-28 | 1 | -1/+1 | |
| | | | | ||||||
* | | | | Add support for CollectionAssociation#delete by Fixnum or String | Francesco Rodriguez | 2012-05-28 | 2 | -0/+27 | |
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found the next issue between CollectionAssociation `delete` and `destroy`. class Person < ActiveRecord::Base has_many :pets end person.pets.destroy(1) # => OK, returns the destroyed object person.pets.destroy("2") # => OK, returns the destroyed object person.pets.delete(1) # => ActiveRecord::AssociationTypeMismatch person.pets.delete("2") # => ActiveRecord::AssociationTypeMismatch Adding support for deleting with a fixnum or string like `destroy` method. | |||||
* | | | add CollectionProxy#uniq documentation | Francesco Rodriguez | 2012-05-26 | 1 | -0/+21 | |
| | | | ||||||
* | | | add :nodoc: to CollectionProxy#initialize | Francesco Rodriguez | 2012-05-25 | 1 | -1/+1 | |
| | | | ||||||
* | | | add CollectionProxy#== documentation | Francesco Rodriguez | 2012-05-25 | 1 | -0/+24 | |
| | | | ||||||
* | | | add CollectionProxy#count documentation | Francesco Rodriguez | 2012-05-25 | 1 | -0/+26 | |
| | | | ||||||
* | | | add CollectionProxy#to_ary documentation | Francesco Rodriguez | 2012-05-25 | 1 | -2/+35 | |
| | | | ||||||
* | | | add CollectionProxy#delete documentation | Francesco Rodriguez | 2012-05-25 | 1 | -1/+104 | |
| | | | ||||||
* | | | copy edits in collection proxy docs [ci skip] | Vijay Dev | 2012-05-23 | 1 | -25/+18 | |
| | | | ||||||
* | | | Revert "Remove blank trailing comments" | Vijay Dev | 2012-05-23 | 1 | -0/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fa6d921e11363e9b8c4bc10f7aed0b9faffdc33a. Reason: Not a fan of such massive changes. We usually close such changes if made to Rails master as a pull request. Following the same principle here and reverting. [ci skip] | |||||
* | | | add CollectionProxy#length documentation | Francesco Rodriguez | 2012-05-22 | 1 | -5/+37 | |
| | | | ||||||
* | | | add CollectionProxy#size documentation | Francesco Rodriguez | 2012-05-22 | 1 | -2/+25 | |
| | | | ||||||
* | | | add :call-seq: to +first+ and +last+ CollectionProxy methods | Francesco Rodriguez | 2012-05-22 | 1 | -0/+6 | |
| | | | ||||||
* | | | add CollectionProxy#create! documentation | Francesco Rodriguez | 2012-05-22 | 1 | -0/+22 | |
| | | | ||||||
* | | | add CollectionProxy#create documentation | Francesco Rodriguez | 2012-05-22 | 1 | -0/+33 | |
| | | | ||||||
* | | | add more examples to CollectionProxy#find | Francesco Rodriguez | 2012-05-22 | 1 | -0/+9 | |
| | | | ||||||
* | | | adding :call-seq: to CollectionProxy methods | Francesco Rodriguez | 2012-05-22 | 1 | -0/+39 | |
| | | | ||||||
* | | | add CollectionProxy#build documentation | Francesco Rodriguez | 2012-05-22 | 1 | -0/+31 | |
| | | | ||||||
* | | | remove repeated documentation in CollectionProxy#clear | Francesco Rodriguez | 2012-05-22 | 1 | -24/+2 | |
| | | | ||||||
* | | | update CollectionProxy#clear documentation | Francesco Rodriguez | 2012-05-21 | 1 | -3/+2 | |
| | | | ||||||
* | | | update CollectionProxy#delete_all documentation | Francesco Rodriguez | 2012-05-21 | 1 | -2/+29 | |
| | | | ||||||
* | | | add CollectionProxy#delete_all documentation | Francesco Rodriguez | 2012-05-21 | 1 | -0/+65 | |
| | | | ||||||
* | | | Fix AR preloader example | Alexey Vakhov | 2012-05-22 | 1 | -1/+1 | |
| | | | ||||||
* | | | fix CollectionProxy documentation markup | Francesco Rodriguez | 2012-05-21 | 1 | -8/+8 | |
| | | | ||||||
* | | | add CollectionProxy#reload documentation | Francesco Rodriguez | 2012-05-21 | 1 | -0/+18 | |
| | | | ||||||
* | | | improve CollectionProxy#destroy documentation | Francesco Rodriguez | 2012-05-21 | 1 | -5/+37 | |
| | | | ||||||
* | | | add CollectionProxy#destroy documentation | Francesco Rodriguez | 2012-05-21 | 1 | -1/+42 | |
| | | | ||||||
* | | | update CollectionProxy#destroy_all documentation | Francesco Rodriguez | 2012-05-20 | 1 | -1/+9 | |
| | | | ||||||
* | | | Remove blank trailing comments | Henrik Hodne | 2012-05-20 | 1 | -1/+0 | |
| | | | | | | | | | | | | | | | | | | | | | For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace with the first match, and voilà! Note that the regex matches a little bit too much, so you probably want to `git add -i .` and go through every single diff to check if it actually should be changed. | |||||
* | | | add CollectionProxy#select documentation | Francesco Rodriguez | 2012-05-19 | 1 | -2/+55 | |
| | | | ||||||
* | | | add CollectionProxy#find documentation | Francesco Rodriguez | 2012-05-19 | 1 | -0/+20 | |
|/ / | ||||||
* | | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-05-19 | 2 | -11/+293 | |
|\ \ | ||||||
| * | | copy edits [ci skip] | Vijay Dev | 2012-05-19 | 1 | -17/+20 | |
| | | | ||||||
| * | | add CollectionProxy#last documentation | Francesco Rodriguez | 2012-05-19 | 1 | -0/+27 | |
| | | | ||||||
| * | | add CollectionProxy#first documentation | Francesco Rodriguez | 2012-05-19 | 1 | -0/+27 | |
| | | | ||||||
| * | | improve CollectionProxy#concat documentation | Francesco Rodriguez | 2012-05-19 | 1 | -7/+18 | |
| | | |