Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge pull request #4543 from jdelStrother/find_or_init | Jon Leighton | 2012-02-01 | 1 | -0/+12 |
|\ | | | | | Don't instantiate two objects in collection proxy / find_or_instantiate_by | ||||
| * | Don't instantiate two objects in collection proxy / find_or_instantiator_by | Jonathan del Strother | 2012-01-19 | 1 | -0/+12 |
| | | |||||
* | | Fix typo | Rafael Mendonça França | 2012-02-01 | 1 | -2/+2 |
| | | |||||
* | | Use human attribute name to show the dependent destroy message | Rafael Mendonça França | 2012-02-01 | 1 | -1/+25 |
| | | |||||
* | | Merge pull request #4828 from railsaholic/fix_error_message | José Valim | 2012-02-01 | 2 | -2/+2 |
|\ \ | | | | | | | fix has_one, has_many restrict error message | ||||
| * | | fix has_one, has_many restrict error message | Manoj | 2012-02-01 | 2 | -2/+2 |
| | | | |||||
* | | | Merge pull request #4806 from KL-7/do-not-serialize-nil | Aaron Patterson | 2012-02-01 | 1 | -1/+14 |
|\ \ \ | | | | | | | | | Do not serialize nil in serialized attribute. | ||||
| * | | | Do not serialize nil in serialized attribute. | Kirill Lashuk | 2012-01-31 | 1 | -1/+14 |
| | | | | |||||
* | | | | Merge pull request #4809 from cfeist/feist-sqlite-binary-corruption | Aaron Patterson | 2012-02-01 | 2 | -1/+2 |
|\ \ \ \ | |_|/ / |/| | | | Fix for SQLite binary data corrupter (to master branch) | ||||
| * | | | Added test to illustrate bad binary blobs. | Chris Feist | 2012-01-31 | 2 | -1/+2 |
| | | | | |||||
* | | | | fix a typo [ci skip] | Vijay Dev | 2012-02-01 | 1 | -1/+1 |
|/ / / | |||||
* | | | Revert "Merge pull request #4746 from jenslukowski/issue4718" | Aaron Patterson | 2012-01-31 | 1 | -8/+0 |
| | | | | | | | | | | | | | | | This reverts commit 5cad7a0dba652f3e942e58087bc88ba5c5390edc, reversing changes made to bb842e8d2111e50b21a14b8bd6d89371a4b9cd68. | ||||
* | | | Merge pull request #4805 from xuanxu/none_and_null_object_pattern | Jon Leighton | 2012-01-31 | 1 | -0/+13 |
|\ \ \ | |/ / |/| | | Added `none` query method to return zero records. | ||||
| * | | Added `none` query method to return zero records. | Juanjo Bazán | 2012-01-31 | 1 | -0/+13 |
| | | | | | | | | | And added NullRelation class implementing the null object pattern for the `Relation` class. | ||||
* | | | Merge pull request #4742 from petervandenabeele/master | Aaron Patterson | 2012-01-31 | 1 | -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.rb | Peter Vandenabeele | 2012-01-29 | 1 | -0/+3 |
| | | | | |||||
* | | | | Merge pull request #4746 from jenslukowski/issue4718 | Aaron Patterson | 2012-01-31 | 1 | -0/+8 |
|\ \ \ \ | |_|/ / |/| | | | Test and fix for issue 4718 | ||||
| * | | | failing test case for Issue 4718 | Jens Lukowski | 2012-01-28 | 1 | -0/+8 |
| |/ / | |||||
* | | | Merge pull request #4791 from gregolsen/reflection_test_fixed | José Valim | 2012-01-31 | 3 | -4/+4 |
|\ \ \ | | | | | | | | | reflection test fixed | ||||
| * | | | test_get_ids_for_ordered_association fixed | gregolsen | 2012-01-31 | 2 | -2/+2 |
| | | | | |||||
| * | | | reflection test fixed | gregolsen | 2012-01-31 | 1 | -2/+2 |
| | | | | |||||
* | | | | Remove deprecation warnings from tests | Rafael Mendonça França | 2012-01-31 | 3 | -13/+28 |
|/ / / | |||||
* | | | Merge pull request #4783 from gregolsen/ids_reader_fix | Jon Leighton | 2012-01-31 | 2 | -0/+5 |
|\ \ \ | | | | | | | | | ids_reader method fixed, test added to has_many association (for PostgreSQL) | ||||
| * | | | ids_reader method fixed, test added to has_many association | gregolsen | 2012-01-31 | 2 | -0/+5 |
| | | | | |||||
* | | | | Merge pull request #4727 from railsaholic/dependent_restrict_should_add_error | Jon Leighton | 2012-01-31 | 2 | -14/+79 |
|\ \ \ \ | |/ / / |/| | | | has_many/has_one, :dependent => :restrict, deprecation added | ||||
| * | | | suggested fixes for :dependent => :restrict deprecation. | Manoj | 2012-01-31 | 2 | -32/+10 |
| | | | | |||||
| * | | | has_many/has_one, :dependent => :restrict, deprecation added. | Manoj | 2012-01-29 | 2 | -14/+101 |
| |/ / | |||||
* | | | Fix GH #4754. Remove double-quote when using ANSI_QUOTES | kennyj | 2012-01-31 | 1 | -0/+16 |
| | | | |||||
* | | | Replaced all 'for' loops with Enumerable#each | Nathan Broadbent | 2012-01-30 | 3 | -5/+5 |
|/ / | |||||
* | | Add `create_join_table` migration helper to create HABTM join tables | Rafael Mendonça França | 2012-01-27 | 3 | -1/+82 |
| | | |||||
* | | Fix regression from Rails 3.1 | Paul McMahon | 2012-01-27 | 1 | -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-4653 | Aaron Patterson | 2012-01-26 | 1 | -2/+0 |
| | | | | | | | | Remove extra attributes from HABTM join tables in AR tests | ||||
* | | disable automatic explain if there is no logger [closes #4671] | Xavier Noria | 2012-01-26 | 1 | -1/+15 |
| | | |||||
* | | fix fixtures test as table_name is a string now | Sergey Nartimov | 2012-01-26 | 1 | -2/+2 |
| | | |||||
* | | call to_s on value passed to table_name= | Sergey Nartimov | 2012-01-26 | 1 | -0/+5 |
| | | |||||
* | | The primary key is always initialized in the @attributes hash to nil (unless | Aaron Patterson | 2012-01-25 | 2 | -2/+3 |
| | | | | | | | | another value has been specified). | ||||
* | | Handle nil in add_index :length option in MySQL | Paul Sadauskas | 2012-01-24 | 1 | -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 directory | Aaron Patterson | 2012-01-24 | 2 | -1/+64 |
| | | |||||
* | | Merge pull request #4558 from stephencelis/type-cast-unknown-should-fail | Aaron Patterson | 2012-01-23 | 2 | -7/+5 |
|\ \ | | | | | | | Don't type-cast unknown types to YAML. | ||||
| * | | Don't type-cast unknown types to YAML. | Stephen Celis | 2012-01-20 | 2 | -7/+5 |
| | | | |||||
* | | | Fix typo | Jari Jokinen | 2012-01-22 | 1 | -1/+1 |
| | | | |||||
* | | | change AR default_timezone to :utc since it's the default for AR::Railtie | Akira Matsuda | 2012-01-21 | 1 | -2/+2 |
|/ / | |||||
* | | Fix another race condition. | Jon Leighton | 2012-01-20 | 1 | -0/+8 |
| | | | | | | | | | | | | From 2c667f69aa2daac5ee6c29ca9679616e2a71532a. Thanks @pwnall for the heads-up. | ||||
* | | adding tests for previous_changes hash | Aaron Patterson | 2012-01-19 | 1 | -0/+25 |
| | | |||||
* | | Add ActiveRecord::Base#with_lock | Olek Janiszewski | 2012-01-18 | 1 | -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-counters | Aaron Patterson | 2012-01-17 | 6 | -2/+43 |
|\ | | | | | Fix bug where reset_counters resets the wrong counter cache. | ||||
| * | Fix bug where reset_counters resets the wrong counter cache. | David Peter | 2012-01-16 | 6 | -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 test | Aaron Patterson | 2012-01-17 | 1 | -1/+4 |
| | | |||||
* | | validate related records in the same validation context as parent. | Emmanuel Oga | 2012-01-17 | 1 | -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 changes | Aaron Patterson | 2012-01-16 | 2 | -14/+16 |
| |