Commit Graph

9823 Commits

Author SHA1 Message Date
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
Santiago Pastorino
bc2af911f9 backport of inconsistency with cattr_reader and matter_reader with some tweaks
Signed-off-by: wycats <wycats@gmail.com>
2010-03-28 14:03:27 -07:00
Santiago Pastorino
0f18904e2b flatten not needed here
Signed-off-by: wycats <wycats@gmail.com>
2010-03-28 14:03:27 -07:00
Santiago Pastorino
cf7ed7cf2d Time marshalling backported [#4286 state:committed]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-28 14:03:07 -07:00
Joe Rafaniello
c1b2200085 Marshaling a time object added an instance variable to the object which affected the quoting of serialized attributes because the to_yaml of the original object did not match the to_yaml of the marshaled one. Also, Marshal.dump was modifying the source object which the client may not be aware of.
Signed-off-by: wycats <wycats@gmail.com>
2010-03-27 04:33:19 -07:00
José Valim
157c1808b9 Added compatibility to Ruby 1.9.2. 2010-03-26 20:21:07 +01:00
Emilio Tagua
ac7b5a23ba Allow deprecation messages with or without a final period.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-03-25 15:44:16 +01:00
Rodrigo Kochenburger
0022fa309b Set mailer template_root as absolute path [#2263 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-03-25 15:36:12 +01:00
Tom Lea
97e07a88fe Fix incorrect relative paths being used when looking up templates.
The bug will manifest itself by failing to locate templates when running tests,
or when running as a daemon (from /).

It relates the the different behavior of ActionView::Template::Path#to_s and
ActionView::Template::Path#to_str when a RAILS_ROOT is defined. #to_s reports
a path relative to the root, and #to_str reports an absolute path.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-03-25 15:33:05 +01:00
Santiago Pastorino
629afe9f19 ActionView::SafeBuffer should be there for backwards compatibility [#4241 state:committed]
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2010-03-22 14:07:53 +13:00
Bruno Michel
26f2cce232 button_to should generate an html_safe string
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2010-03-22 14:07:42 +13:00
Jeremy Kemper
c0137f62d4 Don't rely on Active Support being loaded here 2010-03-16 19:45:00 -07:00
Jeremy Kemper
f175d19e2a Bundler returns a Pathname from #loaded_from; work around it 2010-03-16 17:55:25 -07:00
Santiago Pastorino
9cfa87519d scope_key_by_partial fix for Ruby 1.9 when there's virtual_path
[#4202 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 16:05:24 -07:00
Santiago Pastorino
2310aef29b translation method of TranslationHelper module returns always SafeBuffer [#4194 status:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 13:49:59 -07:00
James Golick
27aa22826c Improve performance of multibyte utils.
Switch from using String#match to using String#=~. There's no need to
generate a MatchData for each iteration since we're not using it.

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 10:04:33 -07:00
Manfred Stienstra
2d3c58068c Improve performance of Multibyte::Utils.
Replace explicit for-loops by faster enumeration methods.

[#3158]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 10:04:33 -07:00
Santiago Pastorino
374e49b467 Change array entries to safe doesn't worth then the array is joined as a string losing the safe property of his entries
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-03-16 13:14:58 +01:00
Santiago Pastorino
ebf300f41b object_and_class_ext_test warnings removed
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-15 19:07:31 -07:00
Jeremy Kemper
b3d32a5b28 to_str works here 2010-03-15 11:19:46 -07:00
Bas Van Klinkenberg
b99914cc3e Fixed a bug in JSON decoding with Yaml backend, where a combination of dates, escaped or unicode encoded data and arrays would make the parser fail with a ParseError exception.
[#2831]

Signed-off-by: Yehuda Katz <wycats@gmail.com>
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-14 21:50:22 -07:00
Jeremy Kemper
9b209e8cb8 read_ and write_fragment cache preserve html safety yet cache strings only 2010-03-14 18:55:13 -07:00
Santiago Pastorino
056f957b22 There's a Ruby issue with File.basename different versions returns different things, so we shouldn't test that
[#4174]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-14 13:37:30 -07:00
Jeremy Kemper
40c393cb84 Be sure to pass through args to to_yaml 2010-03-11 18:37:36 -08:00
Jeremy Kemper
eed8a8863d Write strings to fragment cache, not outputbuffers 2010-03-11 17:32:26 -08:00
Jeremy Kemper
ec760a57d1 OutputBuffer#to_yaml should return string yaml, not some custom class dump 2010-03-11 17:08:33 -08:00
Sam Ruby
cbc0201a3e Add deprecation warning for overwrite_params and remove rdoc
[#4073 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-10 16:26:04 -08:00
Jeremy Kemper
abb8fbde73 Disprefer JSONGem decoder since it only decodes JSON objects 2010-03-09 11:06:31 -08:00
Aaron Patterson
5a806f6759 converting inject to each and map
[#4119 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-06 20:32:19 -08:00
Stijn Mathysen
f6f75e84c5 Removed the + sign as an accepted character from the parameterize method, as a + sign is interpreted by the browser as a space, possibly resulting in a "ArgumentError: illegal character in key"
[#4080 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-05 14:10:37 -08:00
Santiago Pastorino
d3a8152203 Adds disable option to date_helpers generated hidden fields when html_options specifies it. ht by Marc Schütz
[#3807 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-05 13:49:23 -08:00
Jeremy Kemper
3969148a13 Deprecate omitting the leading slash on a path arg to assert_redirected_to 2010-03-02 14:14:37 -08:00
Bryan Helmkamp
1e64cdf8c9 Bump version constants to 2.3.6 to more easily support generating prerelease gems 2010-03-01 18:24:55 -08:00