aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/base_test.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Return from ActiveRecord::Base#attributes= unless value is a hash [#4070 ↵David Trasbo2010-07-081-0/+7
| | | | | | state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* This patch changes update_attribute implementatino so:Neeraj Singh2010-07-081-0/+40
| | | | | | | | | | - it will only save the attribute it has been asked to save and not all dirty attributes - it does not invoke callbacks - it does change updated_at/on Signed-off-by: José Valim <jose.valim@gmail.com>
* fix ActiveRecord `destroy_all` so it returns destroyed recordsMislav Marohnić2010-07-081-6/+14
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* mass_assignment_security moved from AR to AMo, and minor test cleanupJosh Kalderimis2010-07-081-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* minor changes to mass assignment security patch to bring it in line with ↵Josh Kalderimis2010-07-081-125/+1
| | | | | | rails standards Signed-off-by: José Valim <jose.valim@gmail.com>
* Mass assignment security refactoringEric Chapweske2010-07-081-13/+13
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove ActiveRecord::Base#class_name [#379 state:committed]David Trasbo2010-06-291-19/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* adding column named 'group' to ensure that nothing breaks given that 'group' ↵Neeraj Singh2010-06-231-1/+1
| | | | | | | | is sql reserved word [#4945 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Don't clone associations [#4894 state:resolved]Paul Gillard2010-06-231-0/+8
| | | | | | Cloning an active record object should be shallow in that it should copy attributes but not associations. This was no longer true as a result of #3164. Signed-off-by: José Valim <jose.valim@gmail.com>
* remove executable permission from files that don't need it. [#4802 ↵rohit2010-06-201-0/+0
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* ActiveRecord and ActionPack now use the new descendants implementation.José Valim2010-06-191-4/+0
|
* Fix ActiveRecord::Base.compute_type swallowing NoMethodError. [#4751 ↵Andrew Bloomgarden2010-06-081-0/+17
| | | | | | state:resolved] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Explicitly set Topic model last_read attribute as Date value when Oracle ↵Raimonds Simanovskis2010-06-041-3/+4
| | | | | | enhanced adapter is used (otherwise some tests are failing which assume that this attribute will have Date value)
* move counter_cache tests to a separate file and refactorMislav Marohnić2010-05-241-49/+0
|
* Use better assertion methods for testingNeeraj Singh2010-05-191-25/+25
| | | | | | [#4645 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* AR::Base#clone fixed to set dirty bits for cloned objectpleax2010-05-161-0/+50
| | | | | | [#2919 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Reset quoted_table_name after set_table_name [#4568 state:resolved]Santiago Pastorino2010-05-151-0/+12
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix unintuitive behavior with multiple order and group clausesErnie Miller2010-05-061-0/+10
| | | | | | [#4545 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Move several configuration values from Hash to ActiveSupport::XmlMini, which ↵José Valim2010-04-291-4/+1
| | | | | | both Hash and Array depends on. Also, refactored ActiveModel serializers to just use ActiveSupport::XmlMini.to_tag. As consequence, if a serialized attribute is an array or a hash, it's not encoded as yaml, but as a hash or array.
* making yaml tests less specific to emitter. [#4425 state:resolved]Aaron Patterson2010-04-171-1/+2
| | | | Signed-off-by: wycats <wycats@gmail.com>
* fix a failure and some warnings on 1.9.2 [#4417 state:resolved]Aaron Patterson2010-04-161-1/+1
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* Refactor compute_type to handle situations where the correct class is ↵Andrew White2010-04-121-8/+0
| | | | | | already loaded Signed-off-by: wycats <wycats@gmail.com>
* make ActiveRecord::Base.subclasses a public methodEmmanuel Oga2010-04-121-0/+4
| | | | Signed-off-by: wycats <wycats@gmail.com>
* table_name_prefix and table_name_suffix are class_attributes instead of ↵Phil Smith2010-04-121-7/+51
| | | | | | cattr_accessors. [#4230] Signed-off-by: José Valim <jose.valim@gmail.com>
* cleaning up a bunch of parse time warnings in AR [#4186 state:resolved]Aaron Patterson2010-03-151-9/+9
| | | | Signed-off-by: wycats <wycats@gmail.com>
* fixed a 'RecordNotFound' bug when calling 'reload' on a object which doesn't ↵Tobias Bielohlawek2010-02-261-0/+6
| | | | | | | | met the default_scope conditions, added test [#3166 status:resolved] The reload method didn't made use of 'with_exclusive_scope' when reloading the object. This lead to a RecordNotFound exception, in case the object doesn't met the default_scope condition (anymore) - which is obviously a bug. This quick fix makes use of with_exclusive_scope in the reload method as well. See test for full example. Signed-off-by: José Valim <jose.valim@gmail.com>
* Require persisted? in ActiveModel::Lint and remove new_record? and ↵José Valim2010-02-211-5/+17
| | | | destroyed? methods. ActionPack does not care if the resource is new or if it was destroyed, it cares only if it's persisted somewhere or not.
* Make merging of order values consistentPratik Naik2010-01-171-1/+3
|
* Deprecate ActiveRecord::Base.colorize_logging.José Valim2010-01-131-1/+1
|
* Changed ActiveRecord::Base.store_full_sti_class to be true by default ↵David Heinemeier Hansson2010-01-031-0/+3
| | | | reflecting the previously announced Rails 3 default [DHH]
* Simplify repair_validations on AR and make it work with new callbacks.José Valim2010-01-011-1/+4
|
* Don't publicize with_scope for tests since it may shadow public misuseJeremy Kemper2009-12-281-9/+9
|
* Make Model.all return an array rather than a relation for consistency. Use ↵Pratik Naik2009-12-271-1/+7
| | | | Model.scoped to get a relation
* Replace reset_counter_cache with reset_counters that has API inline with ↵Gabe da Silveira2009-12-031-2/+2
| | | | | | | | existing update_counters method [#1211 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Implement ActiveRecord#reset_counter_cacheMike Breen2009-12-021-0/+10
| | | | | | [#1211 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Unify benchmark APIs.José Valim2009-10-151-5/+5
|
* Merge commit 'rails/master'Emilio Tagua2009-10-071-1/+1
|\
| * Call initialize_copy when cloning [#3164 state:resolved]Paul Gillard2009-10-061-1/+1
| | | | | | | | | | | | | | | | Cloned AR objects are now instantiated through initialize_copy rather than new/initialize. This allows AR classes to override initialize_copy in order to implement deep cloning. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* | Use immutable relation objects to generate queries.Emilio Tagua2009-08-181-1/+1
| |
* | Use finder options as relation method names to provide more familiarEmilio Tagua2009-08-181-1/+1
| | | | | | | | | | naming. Use bang methods convention in methods that alter the relation.
* | Merge commit 'rails/master'Emilio Tagua2009-08-171-10/+8
|\|
| * Remove support for SQLite 2.Pratik Naik2009-08-171-10/+8
| | | | | | | | If you're still using it, please install the plugin from git://github.com/rails/sqlite2_adapter.git
* | Merge commit 'rails/master'Emilio Tagua2009-08-101-1/+46
|\| | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/calculations.rb activerecord/lib/active_record/connection_adapters/mysql_adapter.rb activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
| * With multiparameter date attributes, the behaviour when empty fields are ↵Hugo Peixoto2009-08-091-1/+46
| | | | | | | | | | | | | | | | present is now coherent with the one described in the date_select documentation. [#1715 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Merge commit 'rails/master'Emilio Tagua2009-08-081-0/+17
|\| | | | | | | | | | | Conflicts: activerecord/test/cases/adapter_test.rb activerecord/test/cases/method_scoping_test.rb
| * Add destroyed? to ActiveRecord, include tests for polymorphic urls for ↵José Valim2009-08-071-0/+17
| | | | | | | | destroyed objects and refactor mime responds tests and documentation.
* | Merge commit 'rails/master'Emilio Tagua2009-08-051-0/+69
|\|
| * quoted_date converts time-like objects to ↵Geoff Buesing2009-08-031-0/+69
| | | | | | | | ActiveRecord::Base.default_timezone before serialization. This allows you to use Time.now in find conditions and have it correctly be serialized as the current time in UTC when default_timezone == :utc [#2946 state:resolved]
* | Merge commit 'rails/master'Emilio Tagua2009-07-311-5/+0
|\| | | | | | | | | Conflicts: activerecord/lib/active_record/associations.rb
| * Undefine id and let it automatically be generatedJoshua Peek2009-07-301-5/+0
| |