Yehuda Katz
04d4537cd4
This change causes some failing tests, but it should be possible to make them pass with minimal performance impact.
2009-08-11 15:03:52 -07:00
Pratik Naik
0a558b36eb
Add tests for hm:t#push failures
2009-08-11 02:37:04 +01:00
Bryan Helmkamp
d15ddf04ec
Allow delegating to nil, because the method might actually exist on it
2009-08-10 18:48:38 -05:00
Pratik Naik
d0f891ae02
Rewrite hm:t#create tests using assert_no_difference and assert_difference
2009-08-10 21:30:44 +01:00
Pratik Naik
ad28e0037b
Remove unnecessary scoping for creating hm:t join record
2009-08-10 21:20:01 +01:00
Pratik Naik
50b83984f1
Remove unnecessary scoping and validation checks from hm:t#create
2009-08-10 21:06:49 +01:00
Pratik Naik
d9c4087a9e
Unify hm:t#create and create! implementation
2009-08-10 21:02:06 +01:00
Joshua Peek
f97dae5ebe
Extract common dirty tracking methods in AMo
2009-08-10 13:51:48 -05:00
Joshua Peek
391f978acd
AMo overrides alias_attribute and manages aliasing all known attribute method matchers
2009-08-10 11:58:44 -05:00
Joshua Peek
d574cb31f0
Centralize attr method name concatenation in AttributeMethodMatch
2009-08-10 11:53:10 -05:00
Arthur Zapparoli
55b5cf586a
Fixed typo in test name and CHANGELOG [ #3017 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-10 16:13:18 +01:00
Pratik Naik
e202c6c814
Move :with/:without check outside the method generated by validates_format_of
2009-08-10 15:24:48 +01:00
Elliot Winkler
cccb0e6b93
Add validates_format_of :without => /regexp/ option [Elliot Winkler, Peer Allan]
...
[#430 state:resolved]
Example :
validates_format_of :subdomain, :without => /www|admin|mail/
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-10 15:22:31 +01:00
Kamal Fariz Mahyuddin
600a89f208
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:37 -07:00
codeape
8c32248acb
Introduce grouped_collection_select helper.
...
[#1249 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 23:58:43 -07:00
Erik Ostrom
7d16e94d82
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:30:41 -07:00
Cristi Balan
3e35ba2481
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:59:04 -07:00
Tim Peters
7eaed4fefe
Use table prefix and suffix for schema_migrations index.
...
[#1543 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:56:37 -07:00
Jeff Dean
22f3398253
Introduce validates_with to encapsulate attribute validations in a class.
...
[#2630 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:47:56 -07:00
Fabien Jakimowicz
797588543e
Add support for errors in JSON format.
...
[#1956 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:40:20 -07:00
Jay Pignata
793a9f122f
Fixing isolation test
...
[#3022 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:33:23 -07:00
Daniel Sheppard
b3381cacaf
Fix that JSON parser fails to read escaped backslashes.
...
[#973 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:30:44 -07:00
Leonardo Borges
0c391b46fb
PostgreSQL: XML datatype support
...
[#1874 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:24:54 -07:00
Jaime Bellmyer
9c1bac0b7f
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:19:18 -07:00
Jaime Bellmyer
f0602214e0
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:17:39 -07:00
Morgan Schweers
d2d464e26e
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:57:56 -07:00
Jeremy Kemper
47f7c936a2
Fix test dependency on taggings
2009-08-09 21:30:55 -07:00
Gabe da Silveira
7e3364ac46
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:18:16 -07:00
Jatinder Singh
5704ecffad
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:26 -07:00
Joshua Peek
734e903af5
Deprecate router generation "best match" sorting
2009-08-09 22:53:16 -05:00
Prem Sichanugrist
82dd725fc1
Fix that irregular plural inflections should not be double-pluralized: 'people'.pluralize should return 'people' not 'peoples'.
...
[#1183 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 20:28:57 -07:00
Joshua Nichols
84d24cdae8
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:18:56 -07:00
Jeremy Kemper
279b785839
pare down core_ext dependency
2009-08-09 19:32:38 -07:00
Erik Ostrom
4dda9b644d
Add rindex to ActiveSupport::Multibyte::Chars.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 19:05:19 -07:00
railsbob
e06a0b03c8
has_many :through create should not raise validation errors
...
[#2934 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 18:44:45 -07:00
jeem
e4ceea3795
make private_and_public_methods unmemoizable [ #2372 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-08-09 20:04:48 -05:00
Andrew Moreland
ca92d44e76
Support deep-merging HashWithIndifferentAccess.
...
[#2732 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 17:32:04 -07:00
Max Lapshin
0af4b0755f
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 00:58:40 +01:00
Tristan Dunn
a0f69722be
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:46:16 +01:00
Tristan Dunn
0472839d68
Prevent overwriting of table name in merging SQL conditions [ #2949 state:resolved]
2009-08-10 00:41:36 +01:00
Gabe da Silveira
00d6c76660
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:30:44 +01:00
Arthur Zapparoli
810b59a2a9
Removed duplicated tests [ #3026 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-10 00:08:40 +01:00
Arthur Zapparoli
ce2422ceaf
Model#human_attribute_name now accept symbols [ #3025 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2009-08-09 23:55:54 +01:00
Matt Duncan
920ef4e6f3
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:54:21 +01:00
Grzegorz Forysinski
e391c7a97c
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:39:38 +01:00
Vladimir Meremyanin
08ec22054f
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:23 +01:00
Jordan Brough
916b18adeb
Active Resource recognizes 410 as Resource Gone now [ #2316 state:resolved] [Jordan Brough, Jatinder Singh]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 22:56:32 +01:00
Tristan Dunn
1af9bd58a0
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:35:57 -07:00
Hugo Peixoto
202b091373
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:26:36 -07:00
Bence Nagy
e1b73b9752
path_names could be used to customize collection actions too
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 14:26:36 -07:00