Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Make default_scope work with Relations | Pratik Naik | 2010-01-23 | 1 | -0/+5 |
| | |||||
* | Simplify calculation scope building. Remove :order from associations as it ↵ | Pratik Naik | 2010-01-18 | 2 | -6/+4 |
| | | | | is troublesome w/ calculation methods using postgresql. | ||||
* | Rename named_scope to scope | Pratik Naik | 2010-01-18 | 7 | -27/+27 |
| | |||||
* | Make relations work as scopes | Pratik Naik | 2010-01-17 | 1 | -4/+4 |
| | |||||
* | Make sure named_scope names are not used as method names already | Pratik Naik | 2010-01-17 | 1 | -2/+2 |
| | |||||
* | Rollback the transaction when one of the autosave associations fails to ↵ | Eloy Duran | 2010-01-08 | 4 | -0/+24 |
| | | | | save. [#3391 state:resolved] | ||||
* | Add failing test that triggers the stack overflow | Bryan Stearns | 2010-01-08 | 2 | -0/+7 |
| | |||||
* | Simplify repair_validations on AR and make it work with new callbacks. | José Valim | 2010-01-01 | 1 | -2/+4 |
| | |||||
* | Refactored previous changes to nested attributes. | Eloy Duran | 2009-12-28 | 2 | -0/+4 |
| | |||||
* | Make polymorphic_inverse_of in Reflection throw an ↵ | Murray Steele | 2009-12-28 | 1 | -1/+2 |
| | | | | | | InverseOfAssociationNotFoundError if the supplied class doesn't have the appropriate association. [#3520 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | ||||
* | Add inverse polymorphic association support. [#3520 state:resolved] | George Ogata | 2009-12-28 | 3 | -0/+4 |
| | | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | ||||
* | delete correct records for a has_many with :primary_key and :dependent => ↵ | Matt Jones | 2009-11-10 | 1 | -0/+2 |
| | | | | | | :delete_all Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Define autosave association callbacks when using accepts_nested_attributes_for. | Eloy Duran | 2009-11-07 | 2 | -2/+2 |
| | | | | | | | This way we don't define all the validation methods for all associations by default, but only when needed. [#3355 state:resolved] | ||||
* | Allow accepts_nested_attributes_for :reject_if option accept symbols for ↵ | Pratik Naik | 2009-10-07 | 1 | -0/+4 |
| | | | | | | | | using a method Conflicts: activerecord/lib/active_record/nested_attributes.rb | ||||
* | Make has_one with :conditions hash scope build or creation of the associated ↵ | Luciano G Panaro | 2009-09-28 | 1 | -0/+2 |
| | | | | | | | object with those conditions Signed-off-by: Michael Koziarski <michael@koziarski.com> [#3088 state:committed] | ||||
* | Define autosave association validation methods only when needed. [#3161 ↵ | Alexey Kovyrin | 2009-09-12 | 2 | -4/+7 |
| | | | | | | state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | ||||
* | Fix has_one with foreign_key and primary_key association bug which caused ↵ | Graeme Porteous | 2009-09-12 | 1 | -0/+1 |
| | | | | | | | | the associated object being lost when saving the owner. [#1756 state:resolved] Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | ||||
* | Explicitely setting `autosave => false' should override new_record ↵ | Eloy Duran | 2009-09-12 | 1 | -0/+5 |
| | | | | | | autosaving. [#2214 state:resolved] Original author is Jacob. | ||||
* | Raise an exception with friendlier error message when attempting to build a ↵ | Mike Breen | 2009-09-12 | 1 | -0/+2 |
| | | | | | | polymorphic belongs_to with accepts_nested_attributes_for. [#2318 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | ||||
* | Refactor new callbacks and AR implementation. | José Valim | 2009-09-08 | 3 | -3/+20 |
| | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Changed ActiveRecord to use new callbacks and speed up observers by only ↵ | José Valim | 2009-09-08 | 3 | -5/+10 |
| | | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | has_many :through create should not raise validation errors | railsbob | 2009-08-09 | 2 | -0/+6 |
| | | | | | | [#2934 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Prevent overwriting of table name in merging SQL conditions [#2949 ↵ | Tristan Dunn | 2009-08-10 | 1 | -1/+5 |
| | | | | state:resolved] | ||||
* | Enable has_many :through for going through a has_one association on the join ↵ | Gabe da Silveira | 2009-08-10 | 1 | -0/+1 |
| | | | | | | model [#2719 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Fix for nested :include with namespaced models. | Rich Bradley | 2009-08-09 | 1 | -1/+1 |
| | | | | [#260 state:committed] | ||||
* | Adding :from scoping to ActiveRecord calculations | Matt Duncan | 2009-08-09 | 1 | -0/+2 |
| | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1229 state:committed] | ||||
* | added Subject#after_initialize to be the same as Topic#after_initialize | Raimonds Simanovskis | 2009-08-06 | 1 | -1/+9 |
| | |||||
* | added :order option to find :first methods and associations as otherwise ↵ | Raimonds Simanovskis | 2009-08-06 | 1 | -2/+6 |
| | | | | | | | | Oracle tests were failing Oracle stores '' string as NULL Oracle cannot have identifiers larger than 30 characters added missing fixtures to test setup method | ||||
* | Add simple support for ActiveModel's StateMachine for ActiveRecord | Joshua Peek | 2009-08-04 | 1 | -0/+27 |
| | |||||
* | Revert "Methods invoked within named scope Procs should respect the scope ↵ | Jeremy Kemper | 2009-07-29 | 1 | -2/+0 |
| | | | | | | | | | | stack. [#1267 state:resolved]" This reverts commit 6a13376525f34a00e013fc3a6022838329dfe856. Conflicts: activerecord/test/cases/named_scope_test.rb | ||||
* | Add primary_key option to belongs_to association | Szymon Nowak | 2009-07-15 | 5 | -1/+9 |
| | | | | | | [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Revert "Revert "Generate proper :counter_sql from :finder_sql when there is ↵ | Pratik Naik | 2009-07-01 | 2 | -0/+10 |
| | | | | | | | | | a newline character immediately following 'SELECT' [#2118 state:resolved]"" This reverts commit 80f1f863cd0f9cba89079511282de5710a2e1832. The feature doesn't work on Postgres, so don't test it on Postgres. Also, Postgres compatibility is irrelevant to the ticket/patch in question. | ||||
* | Revert "Generate proper :counter_sql from :finder_sql when there is a ↵ | Yehuda Katz + Carl Lerche | 2009-06-22 | 2 | -10/+0 |
| | | | | | | | | newline character immediately following 'SELECT' [#2118 state:resolved]" This reverts commit 4851ca9e13a4317342df02ae25b1929340523f7a. The tests do not pass for postgresql. | ||||
* | Generate proper :counter_sql from :finder_sql when there is a newline ↵ | Patrick Joyce | 2009-06-21 | 2 | -0/+10 |
| | | | | | | character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Ensure hm:t#create respects source associations hash conditions [#2090 ↵ | mattbauer | 2009-06-21 | 1 | -0/+2 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Merge branch 'master' into active_model | Joshua Peek | 2009-05-29 | 8 | -0/+34 |
|\ | | | | | | | | | | | | | | | | | | | | | Conflicts: activemodel/lib/active_model/core.rb activemodel/test/cases/state_machine/event_test.rb activemodel/test/cases/state_machine/state_transition_test.rb activerecord/lib/active_record/validations.rb activerecord/test/cases/validations/i18n_validation_test.rb activeresource/lib/active_resource.rb activeresource/test/abstract_unit.rb | ||||
| * | Make sure default_scope#create checks for options[:conditions] [#2181 ↵ | Pratik Naik | 2009-05-18 | 1 | -0/+10 |
| | | | | | | | | state:resolved] [James Le Cuirot] | ||||
| * | Fixed limited eager loading associations with numbers in the name [#2668 ↵ | Benjamin Floering | 2009-05-18 | 1 | -0/+1 |
| | | | | | | | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
| * | Cherry-pick core extensions | Jeremy Kemper | 2009-05-13 | 1 | -0/+2 |
| | | |||||
| * | Revert "Fixed bug with polymorphic has_one :as pointing to an STI record" | Jeremy Kemper | 2009-05-11 | 1 | -4/+0 |
| | | | | | | | | | | | | [#2594 state:open] This reverts commit 99c103be1165da9c8299bc0977188ecf167e06a5. | ||||
| * | Allow you to pass :all_blank to :reject_if option to automatically create a ↵ | Mike Breen | 2009-05-10 | 1 | -0/+2 |
| | | | | | | | | Proc that will reject any record with blank attributes. | ||||
| * | Providing support for :inverse_of as an option to associations. | Murray Steele | 2009-05-04 | 4 | -0/+19 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can now add an :inverse_of option to has_one, has_many and belongs_to associations. This is best described with an example: class Man < ActiveRecord::Base has_one :face, :inverse_of => :man end class Face < ActiveRecord::Base belongs_to :man, :inverse_of => :face end m = Man.first f = m.face Without :inverse_of m and f.man would be different instances of the same object (f.man being pulled from the database again). With these new :inverse_of options m and f.man are the same in memory instance. Currently :inverse_of supports has_one and has_many (but not the :through variants) associations. It also supplies inverse support for belongs_to associations where the inverse is a has_one and it's not a polymorphic. Signed-off-by: Murray Steele <muz@h-lame.com> Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
| * | Fixed bug with polymorphic has_one :as pointing to an STI record | Ruy Asan | 2009-05-01 | 1 | -0/+4 |
| | | | | | | | | | | | | [#2594 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | | Merge branch 'master' into active_model | Pratik Naik | 2009-04-22 | 4 | -9/+10 |
|\| | | | | | | | | | Conflicts: activeresource/lib/active_resource/validations.rb | ||||
| * | Fix tests for sqlite3 3.6.xx | Pratik Naik | 2009-04-21 | 1 | -1/+1 |
| | | |||||
| * | Ensure :dependent => :delete_all works for association with hash conditions | Pratik Naik | 2009-04-20 | 2 | -8/+7 |
| | | |||||
| * | Ensure JoinAssociation uses aliased table name when multiple associations ↵ | Pratik Naik | 2009-04-20 | 1 | -0/+2 |
| | | | | | | | | have hash conditions on the same table | ||||
| * | Added :touch option to belongs_to associations that will touch the parent ↵ | David Heinemeier Hansson | 2009-04-16 | 1 | -1/+1 |
| | | | | | | | | record when the current record is saved or destroyed [DHH] | ||||
* | | Deprecate Model#validate/validate_on_create/validate_on_update. Use ↵ | Pratik Naik | 2009-03-21 | 3 | -9/+19 |
| | | | | | | | | Model.validate :method and likewise | ||||
* | | Move all the Active Record validations to Active Model | Pratik Naik | 2009-03-19 | 1 | -5/+5 |
|/ |