aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/base_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* remove deprication warning: ambiguous first argument; put parentheses or ↵Vishnu Atrai2011-07-261-1/+1
| | | | even spaces
* Revert "allow select to have multiple arguments"Piotr Sarnacki2011-07-261-5/+0
| | | | | | | This reverts commit 04cc446d178653d362510e79a22db5300d463161. I reverted it because apparently we want to use: select([:a, :b]) instead of select(:a, :b), but there was no tests for that form.
* allow select to have multiple argumentsSławosz Sławiński2011-07-261-0/+5
|
* use existing model for testing Base.create with #after_initializeGabriel Horner2011-07-241-9/+7
|
* simplify and be more explicit about create and after_initialize testsGabriel Horner2011-07-241-18/+10
|
* fix after_initialize edge case (close #2074 and close #2175)Les Fletcher2011-07-241-0/+23
| | | | fix behavior when after_initialize is defined and a block is passed to Base.create
* Merge pull request #2086 from amatsuda/date_multiparameter_nilXavier Noria2011-07-231-24/+9
|\ | | | | convert multiple Date parameters into a nil if any of its bits were blank
| * convert multiple Date parameters into a nil if any of its bits were blankAkira Matsuda2011-07-151-24/+9
| |
* | bigdecimal should be typecast to a float on sqlite3. fixes #2162Aaron Patterson2011-07-201-0/+11
|/
* Fix and unit test for https://github.com/rails/rails/issues/2059Evan Light2011-07-141-2/+27
| | | | | | | | | | | | Cache key was incorrectly using timezone-dependent record#updated_at when it should be using a timezone-independent value to generate the cache key Minor refactoring to cache_key timezone test Closes #2059 Adds a test to validate the format of the cache_key for nil and present updated_at values Correctly handles updated_at == nil
* ActiveRecord::Base should pass ActiveModel::Lint.Grant Hutchins & Peter Jaros2011-07-081-0/+10
|
* comparing different classes returns nilDamien Mathieu2011-06-261-0/+6
|
* allow comparison on model objects - Closes #1858Damien Mathieu2011-06-261-0/+7
|
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* Raise NameError instead of ArgumentError in ActiveSupport::DependenciesAndrew White2011-06-011-0/+7
| | | | | | | | ActiveSupport::Dependencies now raises NameError if it finds an existing constant in load_missing_constant. This better reflects the nature of the error which is usually caused by calling constantize on a nested constant. Closes #1423
* removed deprecated methods, and related tests, from ActiveRecordJosh Kalderimis2011-05-251-7/+0
|
* Allow pluralize_table_names for individual modelGuillermo Iguaran2011-05-201-0/+9
|
* Add ActiveRecord::attribute_names to retrieve a list of attribute names. ↵Prem Sichanugrist2011-05-151-0/+13
| | | | This method will also return an empty array on an abstract class or a model that the table doesn't exists.
* Fix assigning protected attributes by attributes=knapo2011-05-111-2/+7
|
* minor cleaningVishnu Atrai2011-05-101-1/+1
|
* Multiparameter POLA, time_select fixes. See LH4346Aditya Sanghi2011-05-051-0/+135
|
* deprecated the use of the guard_protected_attributes argument with ↵Josh Kalderimis2011-04-251-0/+6
| | | | attributes= in AR in favor of assign_attributes(attrs, :without_protection => true)
* Added assign_attributes to Active Record which accepts a mass-assignment ↵Josh Kalderimis2011-04-241-1/+1
| | | | security scope using the :as option, while also allowing mass-assignment security to be bypassed using :with_protected
* Bypass IdentityMap in PostgreSQL geometric tests.Jason Weathered2011-04-171-2/+2
| | | | The identity map cache prevents us from seeing the DB formatted strings.
* Evaluate default scopes at the last possible moment in order to avoid ↵Jon Leighton2011-04-121-10/+2
| | | | problems with default scopes getting included into other scopes and then being unable to remove the default part via unscoped.
* Deprecated support for passing hashes and relations to default_scope, in ↵Jon Leighton2011-04-121-4/+8
| | | | favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details.
* Use IM when trying to load records using ID.Emilio Tagua2011-04-041-5/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Added new #update_column method.Sebastian Martinez2011-03-271-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Revert "Removed #update_attribute method. New #update_column method."Sebastian Martinez2011-03-271-1/+1
| | | | | | This reverts commit 45c233ef819dc7b67e259dd73f24721fec28b8c8. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Removed #update_attribute method. New #update_column method.Sebastian Martinez2011-03-261-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Allow to read and write AR attributes with non valid identifiersSantiago Pastorino2011-03-221-0/+12
|
* Active Record typos.R.T. Lechow2011-03-051-2/+2
|
* use an attribute rather than a SQL literalAaron Patterson2011-02-261-0/+1
|
* Add interpolation of association conditions back in, in the form of proc { ↵Jon Leighton2011-02-141-6/+0
| | | | ... } rather than instance_eval-ing strings
* rawr, mysql, mysql2, why do you hate me. :'(Aaron Patterson2011-02-091-2/+4
|
* use parenthesis so limit works on all dbsAaron Patterson2011-02-091-6/+4
|
* Allow limit values to accept an ARel SQL literal.Ken Collins2011-02-091-2/+8
|
* comma limits do not make sense on oracle or pgAaron Patterson2011-02-081-3/+5
|
* primary keys should not be cleared on cache clear, fixing oracle testsAaron Patterson2011-02-081-0/+5
|
* limit() should sanitize limit valuesAaron Patterson2011-02-081-0/+34
| | | | This fixes CVE-2011-0448
* make set_table_name take effect immediatelyJan2011-02-081-0/+11
|
* allow AR caches to be cleared, clear them on class reloadingAaron Patterson2011-02-031-0/+8
|
* Make serialized columns with explicit object_type return a new instance of ↵Guillermo Álvarez2011-02-031-0/+19
| | | | the object instead of nil
* store the serialized column values in the @attributes hashAaron Patterson2011-02-011-0/+25
|
* serialize can take an arbitrary code objectAaron Patterson2011-02-011-0/+21
|
* Use encode_with for marshallingJon Leighton2011-01-071-0/+7
|
* Make serialized fixtures work againPratik Naik2010-12-291-1/+1
|
* stop redifining methods on every call to set_primary_keyAaron Patterson2010-12-241-4/+8
|
* define_attr_method must serialize nil correctlyAaron Patterson2010-12-201-0/+5
|