Commit Graph

2211 Commits

Author SHA1 Message Date
Manfred Stienstra
c3aa2bcdcf Ensure nested with_scope merges conditions inside out [#2193 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-10 11:49:58 +00:00
Bruce Krysiak
8272630ce8 Ensure ActiveRecord#to_xml respects :skip_types for included associations [#1632 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-10 11:17:16 +00:00
Curtis Hawthorne
0d922885fb Ensure Model#destroy respects optimistic locking [#1966 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-09 14:56:09 +00:00
Jim Remsik and Tim Pope
1e6c50e21b Ensure has_many :through works with changed primary keys [#736 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-09 13:43:28 +00:00
Rob Anderton
faf4ba6b79 Allow find(:last) :order be a symbol [#2024 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-09 12:52:14 +00:00
Jan De Poorter
277c799d58 Fix find_by_last when order is given [#2127 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-03-09 13:02:31 +01:00
Jeffrey Hardy
96eaeee446 Add ActiveRecord::Base#invalid? as the opposite of #valid? [#2159 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-08 15:20:23 +00:00
John Aughey
7a26a67b42 Ensure SQLite adapters stores the config [#1947 state:resolved] [John Aughey, Pratik Naik]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-08 14:47:32 +00:00
stopdropandrew
6543426c73 Ensure calculations respect scoped :select [#1334 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-07 15:26:56 +00:00
Arthur Klepchukov
ccb0a92fa2 Ensure validates_uniqueness_of considers limit on the field. [#1042 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-07 13:52:17 +00:00
Adam Milligan
f36513653f Fix RDoc grammar and ensure hm:t tests can run in isolation. [#1644 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-07 12:34:56 +00:00
Pratik Naik
fd3ccbe955 DRY with_kcode in Active Record tests 2009-03-07 11:06:44 +00:00
Will Bryant
7fb7b48a1f Allow :having conditions to be sanitized like regular :condition. [#2158 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-06 22:29:53 +00:00
Adam Cooper
3ca5a0f9fd Ensure belongs_to association with a counter cache in name spaced model works [#1678 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-06 22:05:18 +00:00
Dimitri Krassovski
984bc7a614 Ensure replacing has_one associations respects the supplied :dependent option. [#1305 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-06 19:11:13 +00:00
Pratik Naik
4863634a15 Ensure supplie :from has precedence over scoped :from [#1370 state:resolved] 2009-03-06 18:36:30 +00:00
Tom Lea
c896d56c6e Ensure self referential HABTM associations raise an exception if association_foreign_key is missing. [#1252 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-06 18:27:34 +00:00
jvoorhis
6a13376525 Methods invoked within named scope Procs should respect the scope stack. [#1267 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-06 16:47:50 +00:00
Joshua Peek
9b1b88f09c Fixed reset_session for ActiveRecord session store [#2108 state:resolved] 2009-03-03 13:07:03 -06:00
Michael Koziarski
818556ec4f Revert "DDL transactions and savepoints for sqlite"
This reverts commit 38136f86dc.

Caused several test failures on the ci box:

http://ci.rubyonrails.org/builds/rails/38136f
[#2080 state:open]
2009-03-02 19:07:39 +13:00
Jason King
38136f86dc DDL transactions and savepoints for sqlite
Sqlite has had DDL transactions since 2.0.0[1] and savepoints since
3.6.8[2].  This patch updates the connection_adapters.

[1] http://tinyurl.com/sqlite-v2-0-0
[2] http://tinyurl.com/sqlite-v3-6-8

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#2080 state:committed]
2009-03-02 18:46:30 +13:00
Pratik Naik
0db6c3f518 Merge docrails and update the release notes 2009-02-28 19:44:25 +00:00
Mike Gunderloy
c653f700d3 Fix that scoped find with :group and :having [#2006 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-02-28 17:35:58 +00:00
David Heinemeier Hansson
77b0994c78 Prep for RC2 later today 2009-02-27 14:46:23 +01:00
Zack Hobson
ff894b55dd Update rdoc: all is not a named_scope [#1959 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-02-27 14:43:11 +01:00
David Heinemeier Hansson
6de83562f9 Force all internal calls to Array#to_sentence to use English [#2010 state:resolved] 2009-02-27 14:22:39 +01:00
Eloy Duran
e2b925fa68 Don't validate records of an :autosave association if they're marked for destruction. [#2064 status:resolved]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-02-27 13:57:27 +01:00
David Heinemeier Hansson
5cda000bf0 Fixed that autosave should validate associations even if master is invalid [#1930 status:committed] 2009-02-27 13:50:24 +01:00
Diego Algorta
0dd2f96f5c Fixed bug that makes named_scopes _forgot_ current scope 2009-02-25 09:21:08 -08:00
Joshua Peek
1b22071b27 Ensure ActiveRecord session store's connections are checked in after each request [#1927 state:resolved] 2009-02-24 11:34:32 -06:00
Pratik Naik
53cd102b39 Merge with docrails 2009-02-24 12:29:25 +00:00
David Heinemeier Hansson
45787bdd0e Fix docs 2009-02-23 12:20:37 +01:00
David Heinemeier Hansson
d13623ca46 Added ActiveRecord::Base.each and ActiveRecord::Base.find_in_batches for batch processing [DHH/Jamis Buck] 2009-02-23 12:11:02 +01:00
Michael Koziarski
06040849b5 Revert "Wrap calls to update_attributes in a transaction."
This caused failures on sqlite, sqlite3 and postgresql

This reverts commit fc09ebc669.
[#922 state:reopened]
2009-02-22 16:41:04 +13:00
Xavier Noria
fc09ebc669 Wrap calls to update_attributes in a transaction.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#922 state:committed]
2009-02-22 15:31:27 +13:00
Lance Ivy
5dbc9d40a4 Changed API of NestedAttributes to take an array, or hash with index keys, of hashes that have the id on the inside of the attributes hash and updated the FormBuilder to produce such hashes. Also fixed NestedAttributes with composite ids.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
[#1892 state:committed]
2009-02-13 21:47:56 +13:00
Jeremy Kemper
34f34e3009 Merge branch 'master' of git@github.com:rails/rails 2009-02-05 23:05:41 -08:00
Pratik Naik
96d610553e Merge docrails along with the new guides and guides generation code 2009-02-06 02:01:22 +00:00
Michael Koziarski
011ea46569 Don't use weird attribute_condition methods in AR Session Store
Use the hash condition for find instead.
2009-02-06 14:32:03 +13:00
Will Bryant
9991868d85 support end-exclusive ... Ranges in SQL hash condition sanitization properly
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1865 state:committed]
2009-02-06 13:43:02 +13:00
Max Lapshin
1fe9d6cc88 Support true/false in query_attribute for calculated columns
Signed-off-by: Tarmo Tänav <tarmo@itech.ee>
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2009-02-06 13:39:08 +13:00
Eloy Duran
db5d695016 Also save :autosave enabled associations when #save! is used.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1877 state:committed]
2009-02-06 13:38:15 +13:00
Pascal Ehlert
455a7633db Nested attribute accessors should ignore new records with truthy _delete key.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1861 state:committed]
2009-02-06 13:36:59 +13:00
Scott Taylor
5a8f764661 Add ActiveRecord::Base.exists? with no args [#1817 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-02-05 20:51:06 +01:00
Jeremy Kemper
6f8ed1cd3f Migrations: make default database connection overridable 2009-02-04 12:21:22 -08:00
Pratik Naik
886124e688 Merge docrails 2009-02-01 18:25:03 +00:00
miloops
2b8be761e4 validate_length_of should use custom message if given when using in or within.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1057 state:committed]
2009-02-01 14:58:17 +13:00
Eloy Duran
ec8f045844 Add support for nested object forms to ActiveRecord and the helpers in ActionPack
Signed-Off-By: Michael Koziarski <michael@koziarski.com>

[#1202 state:committed]
2009-02-01 14:44:30 +13:00
Jacob Dunphy
e6493eb9b7 Sqlite adapter's copy_table incorrectly attempts to recreate a primary key id (:id => true in the create_table) if an :id column is present, even if it isn't a primary_key.
This fix sets :id => false if there is an :id column, but it's not the primary_key.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1766 state:committed]
2009-01-29 17:34:33 +13:00
Filip H.F. "FiXato" Slagter
a0d8202bb9 Ensure whitespaces are stripped when merging string joins. [#1297 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-01-28 19:50:55 +00:00