10305 Commits

Author SHA1 Message Date
David Heinemeier Hansson
f3c7bbeedd Added db/seeds.rb as a default file for storing seed data for the database. Can be loaded with rake db:seed (or created alongside the db with db:setup). (This is also known as the "Stop Putting Gawd Damn Seed Data In Your Migrations" feature) [DHH]
Conflicts:

	railties/CHANGELOG
2009-08-18 16:08:50 +01:00
Pratik Naik
b9f668ea94 Deprecate SQLite2Adapter and DeprecatedSQLiteAdapter 2009-08-17 14:49:31 +01:00
Jeremy Kemper
d8ae3d5a8b 2-3-stable CI notifies rails core list 2009-08-15 20:31:02 -07:00
Jeremy Kemper
1cb433ce78 Bump pg gem requirement to 0.8.0. Build psql db with UTF8 encoding. 2009-08-15 19:04:16 -07:00
Hongli Lai (Phusion)
14b6ab0f01 Fix reloading of metal pieces.
- Do not hold references to old metal objects after metal classes have been reloaded.
- Obtain the reloader lock before building the middleware stack, so that reloading of metal pieces works in the face of multithreading.

[#2873 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-15 18:00:49 -07:00
Jay Pignata
1cf32ad35a Adding a call to logger from params_parser to give detailed debug information when invalid xml or json is posted
[#2481 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-15 16:46:43 -07:00
Jeremy Kemper
75a483e18e Normalize route generation order: associations, yield block, then own routes. 2009-08-15 15:58:20 -07:00
Jeremy Kemper
061b0ba6cb Refine the deprecated route check to explicitly check whether the future route pick comes before the deprecated route that was found. 2009-08-15 15:53:45 -07:00
Jatinder Singh
dbc62ad225 Fix ActiveResource load test for 64bit machines [#3051 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-15 19:57:22 +01:00
Jay Pignata
a249cad5ef Fix calculation tests on sqlite2 [#3053 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-15 19:52:08 +01:00
Jay Pignata
dad0f62dc9 Fix test_has_many_through_polymorphic_has_one on sqlite2 [#3054 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-15 19:27:35 +01:00
Jeremy Kemper
6f5d1f3190 'would of' => 'will be' 2009-08-11 01:25:15 -05:00
Bryan Helmkamp
e82b43599e Allow delegating to nil, because the method might actually exist on it 2009-08-10 18:49:37 -05:00
Hongli Lai (Phusion)
a91969803e Correctly unlock the reloader lock if the underlying app raises an exception.
[#2873 state:incomplete]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-10 16:18:35 -05:00
Kamal Fariz Mahyuddin
9284bcc35a find_cmd should return the full path of the db command
[#1488 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-10 00:04:51 -07:00
codeape
9a42096e95 Introduce grouped_collection_select helper.
[#1249 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-10 00:00:02 -07:00
Erik Ostrom
4e014379a3 Correctly handle offsets in Multibyte::Chars#index and #rindex.
The offset in codepoints was being passed directly to the wrapped string's index/rindex method. Now we translate the offset into bytes first.

[#3028 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 23:32:08 -07:00
Cristi Balan
25fe43bc14 Add tests for scoping schema_migrations index by global table prefix and suffix
[#1543 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:58:35 -07:00
Tim Peters
9e96f37edd Use table prefix and suffix for schema_migrations index.
[#1543 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:57:37 -07:00
Fabien Jakimowicz
c3da22c042 Add support for errors in JSON format.
[#1956 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:41:56 -07:00
Daniel Sheppard
9341655fa3 Fix that JSON parser fails to read escaped backslashes.
[#973 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:32:13 -07:00
Leonardo Borges
5c74cffae6 PostgreSQL: XML datatype support
[#1874 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:26:26 -07:00
Jaime Bellmyer
9d51f62866 raises an exception on habtm join table inserts if join table contains a primary key. Caches this check to save time on subsequent inserts.
[#2086 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:20:02 -07:00
Jaime Bellmyer
9a3a7983c3 raises exception (ActiveRecord::ConfigurationError with message) on habtm association creation if join table contains a primary key
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:19:56 -07:00
José Valim
e972acc0d7 Allow radio buttons to work with booleans.
[#2937 state:committed]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 22:15:35 -07:00
Morgan Schweers
d0bdff0799 Fix that creating a table whose primary key prefix type is :table_name generates an incorrectly pluralized primary key.
[#872 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 21:59:08 -07:00
Jeremy Kemper
011baa0f65 Fix test dependency on taggings 2009-08-09 21:31:22 -07:00
Gabe da Silveira
9bc80f4dd1 Fix that counter_cache breaks with has_many :dependent => :nullify.
[#1196 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 21:31:13 -07:00
Jatinder Singh
8a49af3158 AR should respect default values for MySQL BINARY and VARBINARY columns.
[#1273 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 21:05:29 -07:00
Joshua Peek
ff643ce967 Deprecate router generation "best match" sorting 2009-08-09 22:52:14 -05:00
Joshua Nichols
ebb6606a4d Only load db/schema.rb if it exists; otherwise, display a message to run db:migrate or remove active_record in environment.rb.
[#3012 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 20:19:31 -07:00
Joshua Nichols
15fd67e9d8 Backported XML serialization behavior from master for dealing with root nodes that have modules.
ie,
- the root node is dasherized, such that MyApplication::Business::Project becomes <my-application-project-business-project>
- association children nodes have type attributes, such that MyApplication::Business::Developer becomes <developer type="MyApplication::Project::Developer">

[#2723 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 20:13:42 -07:00
Dan Croak
33c054d7e0 has_many :through create should not raise validation errors
[#2934 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 18:47:25 -07:00
jeem
cc3183d4be make private_and_public_methods unmemoizable [#2372 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-08-09 20:04:15 -05:00
Max Lapshin
9e29c084eb Make sure link_to generates the form with the specified :href if any [#2254 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-10 01:00:07 +01:00
Visnu Pitiyanuvath
ecc9b705d7 Allow ho:through#build when the owner is a new record [#1749 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-10 00:49:51 +01:00
Tristan Dunn
491f1b5f36 Prevent overwriting of table name in merging SQL conditions [#2949 state:resolved] 2009-08-10 00:41:53 +01:00
Gabe da Silveira
b763858ed5 Enable has_many :through for going through a has_one association on the join model [#2719 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-10 00:34:32 +01:00
Arthur Zapparoli
9bcacf4962 Removed duplicated tests [#3026 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-10 00:08:50 +01:00
Arthur Zapparoli
18b4ac6992 Model#human_attribute_name now accept symbols [#3025 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2009-08-09 23:56:18 +01:00
Matt Duncan
ba961250bd Fixed to_label_tag to accept id attribute without changing for attribute [#2660 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2009-08-09 23:56:06 +01:00
Grzegorz Forysinski
59c3b0d0de Ensure ActiveResource#load works with numeric arrays [Grzegorz Forysinski, Elad Meidar]
[#2305 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 23:40:06 +01:00
Jordan Brough
be017fd7d5 Active Resource recognizes 410 as Resource Gone now [#2316 state:resolved] [Jordan Brough, Jatinder Singh]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>

Conflicts:

	activeresource/lib/active_resource/exceptions.rb

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 23:33:11 +01:00
Vladimir Meremyanin
93f5d9d5f0 Make sure association conditions work with :include and :joins [#358 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 23:10:34 +01:00
Tristan Dunn
7908cfabf7 No longer require database name for MySQL to allow cross database selects.
[#1122 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 14:36:51 -07:00
Hugo Peixoto
39de15f136 Added both the documentation and a test case for the collection path name customization feature.
[#1218 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 14:27:04 -07:00
Bence Nagy
250e718355 path_names could be used to customize collection actions too
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 14:27:04 -07:00
Jatinder Singh
323f58f19f Make ActiveResource#exists? work [#3020 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 22:25:20 +01:00
Joshua Nichols
29a5549b34 Added back support for destroying an association's object by id. [#2306 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2009-08-09 21:47:06 +01:00
David Burger
c9d4bcf163 Fix that Hash#to_xml and Array#to_xml shouldn't modify their options hashes [#672 state:resolved] [David Burger, Dana Jones]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 21:47:06 +01:00