Commit Graph

6680 Commits

Author SHA1 Message Date
Pratik Naik
533da24bbc Make sure ActiveRecord tests can run individually. Closes #11425 [thechrisoshow, h-lame]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9109 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 11:55:01 +00:00
Geoff Buesing
c62db052a0 config.time_zone and TimeWithZone#marshal_load accept tzinfo/Olson identifiers
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9108 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 04:35:48 +00:00
Geoff Buesing
59183eec6f Time.zone= accepts TZInfo::Timezone instances and Olson identifiers; wraps result in TimeZone instance
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9107 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 04:06:47 +00:00
Geoff Buesing
129d94477b TimeWithZone time conversions don't need to be wrapped in TimeOrDateTime, because TZInfo does this internally
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9106 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 02:10:36 +00:00
Geoff Buesing
e4645e00b7 TimeWithZone#usec returns 0 instead of error when DateTime is wrapped
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9105 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 01:57:41 +00:00
Geoff Buesing
480a7581d4 Rails::Initializer#initialize_time_zone raises an error if value assigned to config.time_zone is not recognized. Rake time zone tasks only require ActiveSupport instead of entire environment
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9104 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 01:45:04 +00:00
David Heinemeier Hansson
d8823d6fb7 Stop adding the antiquated test/mocks/* directories and only add them to the path if theyre still there for legacy reasons [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9102 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-27 22:33:50 +00:00
David Heinemeier Hansson
8301ce4d0b Added that gems can now be plugins if they include rails/init.rb (closes #11444) [jbarnette]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9101 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-27 18:37:53 +00:00
David Heinemeier Hansson
6080943950 Missing test data
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9100 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-27 17:54:43 +00:00
David Heinemeier Hansson
5c0d38f674 Fixed that a return-path header would be ignored (closes #7572) [joost]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9099 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-27 17:54:02 +00:00
David Heinemeier Hansson
f5b991d76d Added Plugin#about method to programmatically access the about.yml in a plugin (closes #10979) [lazyatom]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9098 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-27 17:47:51 +00:00
David Heinemeier Hansson
35d3ede974 New applications should use UTC as the default time zone
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9097 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 21:01:30 +00:00
Rick Olson
c366515abd Fix issue where the :uniq option of a has_many :through association is ignored when find(:all) is called. Closes #9407 [cavalle]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 15:40:57 +00:00
Rick Olson
1648208ab0 Fix duplicate table alias error when including an association with a has_many :through association on the same join table. Closes #7310 [cavalle]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9095 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 15:36:17 +00:00
Rick Olson
628ffad98b More efficient association preloading code that compacts a through_records array in a central location. Closes #11427 [danger]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 15:26:59 +00:00
Pratik Naik
ca9413674e Improve documentation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 12:27:52 +00:00
Michael Koziarski
5c47ceb30b Typo fix in documentation from [9090] References #11422
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9092 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 02:44:16 +00:00
Michael Koziarski
dcbdd004fc Standardise the implementation of the extensions to BigDecimal. Closes #10608 [mikong]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9091 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 02:43:38 +00:00
David Heinemeier Hansson
c10b2255b5 Fixed that ActiveRecord#Base.find_or_create/initialize would not honor attr_protected/accessible when used with a hash (closes #11422) [miloops]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9090 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-25 23:56:48 +00:00
Jeremy Kemper
4942e5b1cb Whitespace + formatting
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-25 21:27:57 +00:00
David Heinemeier Hansson
b0bfcca16e Fixed that FormHelper#radio_button would produce invalid ids (closes #11298) [harlancrystal]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 21:32:50 +00:00
David Heinemeier Hansson
123f5a357d Added :confirm option to submit_tag (closes #11415) [miloops]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9087 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 21:24:40 +00:00
David Heinemeier Hansson
0e62c773f6 Fixed NumberHelper#number_with_precision to properly round in a way that works equally on Mac, Windows, Linux (closes #11409, #8275, #10090, #8027) [zhangyuanyi]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9086 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 21:12:55 +00:00
David Heinemeier Hansson
c6f2af5c31 Added ActiveRecord#Base.all/first/last as aliases for find(:all/:first/:last) (closes #11413) [nkallen, thechrisoshow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9085 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 19:59:22 +00:00
Rick Olson
081ddb6f24 Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 02:50:02 +00:00
Rick Olson
5bf4cbbdb7 Allow the #simple_format text_helper to take an html_options hash for each paragraph. Closes #2448 [Francois Beausoleil, thechrisoshow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 02:29:30 +00:00
Jeremy Kemper
0ff031992f Fix merging blank conditions. Closes #10764 [mcmire, cavalle]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9082 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-23 05:00:25 +00:00
Rick Olson
e1790efb85 Ensure that TimeWithZone#to_yaml works when passed a YAML::Emitter. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-23 04:44:50 +00:00
Rick Olson
0381398708 Fix regression from filter refactoring where re-adding a skipped filter resulted in it being called twice. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9080 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-23 01:48:17 +00:00
Geoff Buesing
29e3316178 Ensure correct TimeWithZone#to_date
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9079 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-22 18:43:36 +00:00
Geoff Buesing
ea285c2f78 Correct grammar in config.time_zone description in environment.rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9078 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-22 05:27:07 +00:00
David Heinemeier Hansson
3e556d3dbc Use the more modern error_messages from the form object rather than error_messages_for
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9077 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-22 04:47:53 +00:00
Geoff Buesing
1ec8a7f4e0 Added config.time_zone = 'UTC' as a commented-out option in the default environment.rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9076 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-22 02:23:09 +00:00
Jeremy Kemper
5c1be2812d has_one :through supports :source_type. Fix up some tests. References #4756.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-22 02:20:37 +00:00
Geoff Buesing
f921a96e85 Adding rake tasks time:zones:all, time:zones:us and time:zones:local for finding time zone names for config.time_zone option
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-22 01:59:09 +00:00
Jeremy Kemper
98d87f38fc Fix schema.rb some more. sponsors.sponsorable_type should be a string. References #4756.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9073 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 23:15:21 +00:00
Jeremy Kemper
36baabe24c Fix schema.rb. Please to be testing on more than just MySQL! References #9067.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9072 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 23:10:42 +00:00
Geoff Buesing
f371f29265 Make TimeWithZone work with tzinfo 0.2.x: use TZInfo::Timezone#zone_identifier alias for #abbreviation, silence warnings on tests. Raise LoadError when TZInfo version is < 0.2 by sniffing for TZInfo::TimeOrDateTime constant. Move all tzinfo-dependent TimeZone tests into uses_tzinfo block
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9071 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 22:48:00 +00:00
Jeremy Kemper
f2840f508d Fix an edge case with extra periods in Routing.normalize_paths. Closes #11337 [cavalle, veejar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9069 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 22:44:04 +00:00
Rick Olson
c23c9bd11b Allow association scoping for built/created records if :conditions is specified as a hash. Closes #11393 [miloops]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9068 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 18:21:56 +00:00
Rick Olson
273b21faa9 Add has_one :through support, finally. Closes #4756 [thechrisoshow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 18:09:03 +00:00
Jeremy Kemper
d8f76e66a1 Missed adds. References #10350.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9066 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-20 16:51:06 +00:00
Jeremy Kemper
bd940d98bd Re-added ActionView::Helpers::register_javascript/stylesheet_expansion to make it easier for plugin developers to inject multiple assets. Closes #10350.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9065 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-20 16:26:04 +00:00
David Heinemeier Hansson
54213dadfd Docfixes (closes #11356, #11172, #10523)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-20 02:15:29 +00:00
Jeremy Kemper
e87d3e3335 Revert [9106]. References #10350.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9063 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-19 19:56:07 +00:00
Jeremy Kemper
eb837b52e3 assert_response, don't cry if @exception isn't available in the template
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9059 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-18 23:37:55 +00:00
Jeremy Kemper
dfa6888311 Migrations: create_table supports primary_key_prefix_type. Closes #10314.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9056 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-18 18:23:14 +00:00
Jeremy Kemper
856a4dcf12 Refactor filters to use Active Support callbacks. Closes #11235.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9055 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-18 17:56:05 +00:00
David Heinemeier Hansson
9af9fc3da1 sshpublisher needs to be explicitly required now, apparently
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9054 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-18 04:46:51 +00:00
David Heinemeier Hansson
db08329946 Fixed that polymorphic routes would modify the input array (closes #11363) [thomas.lee]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9053 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 23:45:42 +00:00