aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | Use human attribute name to show the dependent destroy messageRafael Mendonça França2012-02-011-1/+25
| |
* | Merge pull request #4828 from railsaholic/fix_error_messageJosé Valim2012-02-012-2/+2
|\ \ | | | | | | fix has_one, has_many restrict error message
| * | fix has_one, has_many restrict error messageManoj2012-02-012-2/+2
| | |
* | | Merge pull request #4806 from KL-7/do-not-serialize-nilAaron Patterson2012-02-011-1/+14
|\ \ \ | | | | | | | | Do not serialize nil in serialized attribute.
| * | | Do not serialize nil in serialized attribute.Kirill Lashuk2012-01-311-1/+14
| | | |
* | | | Merge pull request #4809 from cfeist/feist-sqlite-binary-corruptionAaron Patterson2012-02-012-1/+2
|\ \ \ \ | |_|/ / |/| | | Fix for SQLite binary data corrupter (to master branch)
| * | | Added test to illustrate bad binary blobs.Chris Feist2012-01-312-1/+2
| | | |
* | | | fix a typo [ci skip]Vijay Dev2012-02-011-1/+1
|/ / /
* | | Revert "Merge pull request #4746 from jenslukowski/issue4718"Aaron Patterson2012-01-311-8/+0
| | | | | | | | | | | | | | | This reverts commit 5cad7a0dba652f3e942e58087bc88ba5c5390edc, reversing changes made to bb842e8d2111e50b21a14b8bd6d89371a4b9cd68.
* | | Merge pull request #4805 from xuanxu/none_and_null_object_patternJon Leighton2012-01-311-0/+13
|\ \ \ | |/ / |/| | Added `none` query method to return zero records.
| * | Added `none` query method to return zero records.Juanjo Bazán2012-01-311-0/+13
| | | | | | | | | And added NullRelation class implementing the null object pattern for the `Relation` class.
* | | Merge pull request #4742 from petervandenabeele/masterAaron Patterson2012-01-311-0/+3
|\ \ \ | | | | | | | | Set the timezone correctly for a test in activerecord/../base_test.rb
| * | | Set default_timezone explicitly for a test in activerecord/../base_test.rbPeter Vandenabeele2012-01-291-0/+3
| | | |
* | | | Merge pull request #4746 from jenslukowski/issue4718Aaron Patterson2012-01-311-0/+8
|\ \ \ \ | |_|/ / |/| | | Test and fix for issue 4718
| * | | failing test case for Issue 4718Jens Lukowski2012-01-281-0/+8
| |/ /
* | | Merge pull request #4791 from gregolsen/reflection_test_fixedJosé Valim2012-01-313-4/+4
|\ \ \ | | | | | | | | reflection test fixed
| * | | test_get_ids_for_ordered_association fixedgregolsen2012-01-312-2/+2
| | | |
| * | | reflection test fixedgregolsen2012-01-311-2/+2
| | | |
* | | | Remove deprecation warnings from testsRafael Mendonça França2012-01-313-13/+28
|/ / /
* | | Merge pull request #4783 from gregolsen/ids_reader_fixJon Leighton2012-01-312-0/+5
|\ \ \ | | | | | | | | ids_reader method fixed, test added to has_many association (for PostgreSQL)
| * | | ids_reader method fixed, test added to has_many associationgregolsen2012-01-312-0/+5
| | | |
* | | | Merge pull request #4727 from railsaholic/dependent_restrict_should_add_errorJon Leighton2012-01-312-14/+79
|\ \ \ \ | |/ / / |/| | | has_many/has_one, :dependent => :restrict, deprecation added
| * | | suggested fixes for :dependent => :restrict deprecation.Manoj2012-01-312-32/+10
| | | |
| * | | has_many/has_one, :dependent => :restrict, deprecation added.Manoj2012-01-292-14/+101
| |/ /
* | | Fix GH #4754. Remove double-quote when using ANSI_QUOTESkennyj2012-01-311-0/+16
| | |
* | | Replaced all 'for' loops with Enumerable#eachNathan Broadbent2012-01-303-5/+5
|/ /
* | Add `create_join_table` migration helper to create HABTM join tablesRafael Mendonça França2012-01-273-1/+82
| |
* | Fix regression from Rails 3.1Paul McMahon2012-01-271-0/+11
| | | | | | | | | | | | Under Rails 3.1, you were allowed to pass a hash to a find_or_create method with multiple attribute names, but this was broken as the arguments were being improperly validated.
* | Merge pull request #4696 from rafaelfranca/issue-4653Aaron Patterson2012-01-261-2/+0
| | | | | | | | Remove extra attributes from HABTM join tables in AR tests
* | disable automatic explain if there is no logger [closes #4671]Xavier Noria2012-01-261-1/+15
| |
* | fix fixtures test as table_name is a string nowSergey Nartimov2012-01-261-2/+2
| |
* | call to_s on value passed to table_name=Sergey Nartimov2012-01-261-0/+5
| |
* | The primary key is always initialized in the @attributes hash to nil (unlessAaron Patterson2012-01-252-2/+3
| | | | | | | | another value has been specified).
* | Handle nil in add_index :length option in MySQLPaul Sadauskas2012-01-241-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our schema.rb is being generated with an `add_index` line similar to this: add_index "foo", ["foo", "bar"], :name => "xxx", :length => {"foo"=>8, "bar=>nil} This is the same as it was on Rails 3.1.3, however, now when that schema.rb is evaluated, its generating bad SQL in MySQL: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: CREATE UNIQUE INDEX `xxx` ON `foo` (`foo`(8), `bar`()) This commit adds a check for nil on the length attribute to prevent the empty parens from being output.
* | Moving AR::TestCase in to the AR tests directoryAaron Patterson2012-01-242-1/+64
| |
* | Merge pull request #4558 from stephencelis/type-cast-unknown-should-failAaron Patterson2012-01-232-7/+5
|\ \ | | | | | | Don't type-cast unknown types to YAML.
| * | Don't type-cast unknown types to YAML.Stephen Celis2012-01-202-7/+5
| | |
* | | Fix typoJari Jokinen2012-01-221-1/+1
| | |
* | | change AR default_timezone to :utc since it's the default for AR::RailtieAkira Matsuda2012-01-211-2/+2
|/ /
* | Fix another race condition.Jon Leighton2012-01-201-0/+8
| | | | | | | | | | | | From 2c667f69aa2daac5ee6c29ca9679616e2a71532a. Thanks @pwnall for the heads-up.
* | adding tests for previous_changes hashAaron Patterson2012-01-191-0/+25
| |
* | Add ActiveRecord::Base#with_lockOlek Janiszewski2012-01-181-0/+20
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Add a `with_lock` method to ActiveRecord objects, which starts a transaction, locks the object (pessimistically) and yields to the block. The method takes one (optional) parameter and passes it to `lock!`. Before: class Order < ActiveRecord::Base def cancel! transaction do lock! # ... cancelling logic end end end After: class Order < ActiveRecord::Base def cancel! with_lock do # ... cancelling logic end end end
* Merge pull request #4487 from sarenji/fix-reset-countersAaron Patterson2012-01-176-2/+43
|\ | | | | Fix bug where reset_counters resets the wrong counter cache.
| * Fix bug where reset_counters resets the wrong counter cache.David Peter2012-01-166-2/+43
| | | | | | | | | | | | | | | | If a model belongs_to two associations with the same class, then reset_counters will reset the wrong counter cache. Finding the right reflection should use the foreign_key instead, which should be unique.
* | disable transactions for this testAaron Patterson2012-01-171-1/+4
| |
* | validate related records in the same validation context as parent.Emmanuel Oga2012-01-171-0/+17
|/ | | | | | | | | | | | | | | | | | | | E.G.: ```ruby class Parent < ActiveRecord::Base has_one :child validates_presence_of :name, :on => "custom_context" validates_associated :child end class Child < ActiveRecord::Base belongs_to :parent validates_presence_of :name, :on => "custom_context" end p = Parent.new(:name => "Montoto", :child => Child.new) p.valid?(:custom_context) # => Returns true, even though the child is not valid under the same context. ```
* stop more ddl changesAaron Patterson2012-01-162-14/+16
|
* stop ddl modifications for another testAaron Patterson2012-01-162-12/+10
|
* use one based indexes for the mock migrationsAaron Patterson2012-01-161-16/+16
|
* stop making ddl changes for migrator testsAaron Patterson2012-01-162-67/+78
|