10305 Commits

Author SHA1 Message Date
Jeremy Kemper
c9e15709ae PostgreSQL: use standard-conforming strings if possible 2010-04-24 15:36:31 -07:00
Eugene Pimenov
cec44f5838 PostgreSQL adapter: escape_bytea, quote_string and unescape_bytea aren't thread-safe in Ruby 1.8 [#3237 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-04-24 13:12:14 -07:00
Sam Elliott and Santiago Pastorino
c401102a27 Is not nessesary to have @_rails_html_safe instance var when the string is unsafe, also it breaks to_yaml [#3535 state:committed] 2010-04-23 09:35:18 +12:00
Santiago Pastorino
d891754535 load tzinfo on initialize only
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-04-21 09:24:46 -07:00
Santiago Pastorino
49943a7120 TimeZones lazy load
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-20 21:40:49 -07:00
Jeremy Kemper
2401af4d6f MemoryStore#read_multi(*keys) for dev-mode compatibility with memcache store 2010-04-19 00:18:20 -07:00
Jeremy Kemper
fd5c6e2c97 Upgrade bundled i18n from 1.3.3 to 1.3.7 2010-04-17 12:38:16 -07:00
Jeremy Kemper
8b79c7c202 Fix 1.9-specific syntax error in test 2010-04-17 12:37:56 -07:00
Mislav Marohnić
4b36dafb35 String#starts/ends_with? should return false for non-string argument, not raise error
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-17 00:07:26 -07:00
Mislav Marohnić
8be3e09fcf fix reset_counters to work even with complex class names
e.g. it guesses that a belongs_to association to Namespace::MyModel is
named "my_model", unlike before where it would look up an association
named "namespace::mymodel" and fail.
2010-04-17 03:13:13 +02:00
Mislav Marohnić
ef0591efc2 cleanup update/reset_counters; refactor tests 2010-04-17 03:13:00 +02:00
Jeremy Kemper
c55cdd816c Distinguish test for 1.8.6 compat 2010-04-16 11:35:33 -07:00
Mislav Marohnić
c519215aa8 ruby 1.8.7 compat: starts/ends_with? doesn't cast to string
`starts/ends_with?` methods shouldn't cast argument to string because
ruby 1.8.7 doesn't seem to do that. for example:

    "foobar".ends_with?(:bar)
    # => true in ActiveSupport implementation, false in ruby 1.8.7

[#3199 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-16 11:22:50 -07:00
Eugene Pimenov
18ba648e0d Implement find_in_batches without with_scope [#2227 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2010-04-15 01:13:16 +01:00
Xavier Noria
b8b568e53b fix dash -> edit in an example, and a few touches now that we are here 2010-04-14 11:57:36 -07:00
Pratik Naik
5efb1503dd Ensure not to load the entire association when bulk updating existing records using nested attributes 2010-04-14 01:51:43 +01:00
Anil Wadghule
c69dc1afaa Fix for plugin not getting installed on Windows environment [#4320 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-12 11:12:42 +02:00
Yaroslav Markin
a84e9b4f31 Fix Array#to_xml to produce valid markup when working with namespaced classes [#3624 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-10 18:16:46 +02:00
Vicki Ball
dae247316d made error_message_on work by passing in the object name if there is no object [#3246 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-10 14:02:34 +02:00
Jeremy Kemper
2cd29f4297 Only set response etag if body is not blank 2010-04-09 20:19:03 -07:00
Jeremy Kemper
d91d6fe15f CI: show all headers for diagnosis 2010-04-09 20:06:35 -07:00
Jeremy Kemper
efec9b24db Refactor for readability 2010-04-09 19:33:42 -07:00
Jeremy Kemper
56c5290fce CI: message for some outstanding failures 2010-04-09 19:32:47 -07:00
José Valim
4a02437a8d Fix a failure added on 958b0e977a 2010-04-09 22:19:49 +02:00
Santiago Pastorino
958b0e977a fix stack trace lines on class_eval
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-09 22:06:51 +02:00
José Valim
f87a518f81 Fix tests broken in 0653a6d30e 2010-04-09 09:23:09 +02:00
Rolf Bjaanes
fcec7402eb Changed the way inflections for uncountables work for 'funky jeans'
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-09 09:04:33 +02:00
David Heinemeier Hansson
0653a6d30e Fixed that default locale templates should be used if the current locale template is missing [DHH] 2010-04-08 17:15:11 -07:00
Santiago Pastorino
cfb31edb54 Generate routes for nested resources with nil object raise RoutingError [#4262 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-06 21:28:51 -07:00
Simon Effenberg
1d7368200f remove_index now uses quote_table_name() [#4300 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2010-04-06 14:16:40 +12:00
Kristopher Murata
642d5d297e Parameterize should accept malformed utf8 characters [#4323 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-04 11:57:31 -07:00
Andrew White
e617af13a2 Backport of lazy evaluation of has_many ..., :dependent => :___
[#2627 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-04 07:01:38 -07:00
Jeremy Kemper
a72bcdb8ae Check more carefully for vendored tzinfo 2010-04-02 14:39:03 -07:00
Jeremy Kemper
19161e08b3 Adjust test in case tzinfo is not available 2010-04-02 14:05:15 -07:00
Jeremy Kemper
e2ec41a9a6 CI: add tzinfo 2010-04-02 14:01:26 -07:00
Santiago Pastorino
2c148cd96a delegate unknown timezones to TZInfo 2010-04-02 17:45:45 -03:00
Santiago Pastorino
de7925de8a utc_offset is no longer required on TimeZone and if it's not supplied we delegate to TZInfo 2010-04-02 16:53:45 -03:00
Jeremy Kemper
aa48c79ae4 HTML safety: give a deprecation warning if an array of option tags is passed to select tag. Be sure to join the tag yourself and mark them .html_safe 2010-03-31 19:49:29 -07:00
David Heinemeier Hansson
1668ad3baf Added Object#presence that returns the object if it's #present? otherwise returns nil [DHH/Colin Kelley] 2010-03-31 18:27:08 -07:00
Pratik Naik
1f44fc90c6 Dont use Rails 3 finder syntax in Rails 2.3.x test [#4303 state:resolved] 2010-03-31 14:14:56 +01:00
Pratik Naik
0e57c70baf Dont try to load the record from the db if preloading didn't find anything 2010-03-31 12:57:06 +01:00
Xavier Noria
a0454dcd1a avoid method redefined; discarding old empty? warning [Santiago Pastorino] 2010-03-30 17:23:44 -07:00
Santiago Pastorino
e329eab0c9 Don't cache the utc_offset we are already caching the timezone [#4301]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-30 16:36:28 -07:00
Juanjo Bazan
4b08679ba9 New assertion: assert_present
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-03-30 16:02:40 -07:00
Juanjo Bazan
ccb1beeb5b new assertion: assert_blank
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-03-30 15:59:09 -07:00
Joseph Wilk
ea6ef768a7 Fixed a bug where create_table could not be called without a block [#2221 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2010-03-30 15:00:44 +13:00
Dudley Flanders
bf563bd904 Trivial doc update on nested attributes delete renaming
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-03-30 01:40:51 +02:00
Joey Aghion
715b34fdff use supplied primary key when eager-loading belongs_to associations rather than default primary key
[#765]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-29 15:33:45 -07:00
Ernie Miller
00b95eb265 belongs_to associations now honor :primary_key option for joins
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-29 15:33:37 -07:00
Andrew White
03d5d0b5f5 Add the ability to specify table_name_prefix on individual modules
[#4032 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-29 08:55:21 -07:00