Commit Graph

4381 Commits

Author SHA1 Message Date
Jeremy Kemper
4887e53bf9 Use Location rather than location header.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5635 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-26 05:35:53 +00:00
David Heinemeier Hansson
093c725732 Fix that redirects should set "Location" header, not "location", and remove dead CGI.redirect
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5634 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-26 05:04:57 +00:00
David Heinemeier Hansson
2d1169ad16 redirect_to is the one place where _url should be used, not _path [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5633 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-26 04:42:13 +00:00
Jeremy Kemper
ba1db2de63 uses_component_template_root looks at caller[0] which turns up the deprecation method rather than the controller. Use caller[1] instead.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5631 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-26 01:24:10 +00:00
Jeremy Kemper
1d564d97c5 strip_tags passes through blank args such as nil or "". Closes #6702, references #2229.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-26 01:00:10 +00:00
David Heinemeier Hansson
eacca8d7e6 Added Time#to_s(:time) which will just return H:M, like 17:44 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5628 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-25 23:56:28 +00:00
David Heinemeier Hansson
619e5c29f4 Tried delaying database disconnect until after dependency resolution (references #6687, #6700) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5627 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-25 19:59:00 +00:00
David Heinemeier Hansson
396b3f2bef Dont set default charset if the response is sending a file. Closes #6689 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5626 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-25 19:29:10 +00:00
Nicholas Seckar
cf248eae1f Update initializer to load Rails::VERSION as soon as possible. Closes #6698.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-25 17:11:46 +00:00
Tobias Lütke
ad62d461e8 Added CSV to Mime::SET so that respond_to csv will work
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-24 16:35:00 +00:00
David Heinemeier Hansson
7c7d58937b Fixed that HEAD should return the proper Content-Length header (that is, actually use @body.size, not just 0) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5622 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-23 23:52:25 +00:00
David Heinemeier Hansson
efd0bdd9ea * Added GET-masquarading for HEAD, so request.method will return :get even for HEADs. This will help anyone relying on case request.method to automatically work with HEAD and map.resources will also allow HEADs to all GET actions. Rails automatically throws away the response content in a reply to HEAD, so you dont even need to worry about that. If you, for whatever reason, still need to distinguish between GET and HEAD in some edge case, you can use Request#head? and even Request.headers["REQUEST_METHOD"] for get the "real" answer. Closes #6694 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5621 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-23 23:24:47 +00:00
David Heinemeier Hansson
f15d52fc4a Added text/csv as a default mime type and included example on how to make your own in config/environment.rb [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5620 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-23 17:25:52 +00:00
David Heinemeier Hansson
a02dbe0a3d Added ActiveRecord::Base.clear_active_connections! in development mode so the database connection is not carried over from request to request. Some databases won't reread the schema if that doesn't happen (I'm looking at you SQLite), so you have to restart the server after each migration (= no fun) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5618 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-23 05:16:46 +00:00
David Heinemeier Hansson
83dd1d8a03 Actually require the gem found
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5616 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-23 04:49:07 +00:00
David Heinemeier Hansson
958e9a36a9 Made RAILS_GEM_VERSION work for beta gems too, so specifying 1.1.6 will give you 1.1.6.4520 if available [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5614 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-23 04:40:48 +00:00
David Heinemeier Hansson
3805c12a80 Dont include the mime.yml anyway, Mongrel will just ship with more defaults instead
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5612 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-23 02:41:59 +00:00
Nicholas Seckar
d1529a71d1 Update Routing to complain when :controller is not specified by a route. Closes #6669.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5607 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-22 16:31:00 +00:00
Michael Koziarski
a2e826dc0f Change fixture_path to a class inheritable accessor allowing test cases to have their own custom set of fixtures. Closes #6672 [zdennis]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5604 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-21 22:28:24 +00:00
Thomas Fuchs
f5f3cdb1b6 Make sure .morph makes it in
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5602 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 23:45:16 +00:00
Jeremy Kemper
9104d63f99 Quote ActiveSupport::Multibyte::Chars. Closes #6653.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5597 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 12:02:04 +00:00
Jeremy Kemper
cd6beacfb3 Test for forged '' default before it's typecast. Closes #6156.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 11:44:31 +00:00
Jeremy Kemper
6e1012fc9c Test has_one :dependent => :nullify with missing association. Closes #4848.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 11:29:21 +00:00
Jeremy Kemper
ced5d89425 Test has_one :dependent => :nullify with missing association. Closes #4828.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5594 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 11:28:35 +00:00
Jeremy Kemper
427fb035a3 Simplify query_attribute by typecasting the attribute value and checking whether it's nil, false, zero or blank. Closes #6659.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5593 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 11:22:38 +00:00
Jeremy Kemper
6fc8e143c6 Ensure render_to_string cleans up after itself when an exception is raised. Closes #6658. Great tests!
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5591 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 11:03:21 +00:00
Jeremy Kemper
9594832a8d validates_numericality_of uses \A \Z to ensure the entire string matches rather than ^ $ which may match one valid line of a multiline string. Closes #5716.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5589 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 10:51:50 +00:00
Jeremy Kemper
88bd86e8bc Run validations in the order they were declared. Closes #6657.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5588 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 10:12:38 +00:00
Jeremy Kemper
d41f380a2c Extract template_changed_since? from compile_template? so plugins may override its behavior for non-file-based templates. Closes #6651.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5587 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 09:04:26 +00:00
Jeremy Kemper
19c99acfbc MySQL: detect when a NOT NULL column without a default value is misreported as default ''. Can't detect for string, text, and binary columns since '' is a legitimate default. Closes #6156.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 08:54:42 +00:00
Jeremy Kemper
3fc4771996 Test session table pluralization. Closes #6459.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5585 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 04:17:48 +00:00
Thomas Fuchs
de6ffba806 Update trunk w/ latest Prototype and script.aculo.us
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-19 23:01:32 +00:00
David Heinemeier Hansson
44de099efe Restore windows compatibility
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5577 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-19 22:17:26 +00:00
David Heinemeier Hansson
f24ed3bf6d Starting, not started yet
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-19 21:54:48 +00:00
David Heinemeier Hansson
ee8121fc76 Make script/server work with -d and -e on Mongrel
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5575 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-19 21:52:14 +00:00
Rick Olson
5999fdd3f3 Use custom mime file for script/server mongrel if config/mime.yml exists. Pass --mime=other/path for a custom mime file. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5572 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-19 21:12:22 +00:00
Rick Olson
ca2d704c75 Add custom mime type file for mongrel. config/mime.yml is added with generated apps from the rails command. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-19 21:01:25 +00:00
David Heinemeier Hansson
bc6f0d2f30 Scaffold resource should have both a layout and a stylesheet [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5565 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-19 16:57:33 +00:00
Jeremy Kemper
02adc49d72 Simplify association proxy implementation by factoring construct_scope out of method_missing. Closes #6643.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-19 11:16:12 +00:00
Jeremy Kemper
ae8171ddc5 Migration benchmark wrappers use alias_method_chain. Closes #6456.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-19 11:09:31 +00:00
Jeremy Kemper
229ea65374 simple_format helper doesn't choke on nil. Closes #6644.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5561 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-19 09:57:16 +00:00
Thomas Fuchs
bc76044fde Update Prototype in trunk to [5550]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5551 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-17 23:52:54 +00:00
Nicholas Seckar
f92d6a07d0 Reuse named route helper module between Routing reloads to prevent memory leaks.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5548 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-17 22:29:02 +00:00
Jeremy Kemper
44e6aa7e19 Improve readability.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5547 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-17 14:09:46 +00:00
Jeremy Kemper
38136d615e Grep slightly faster than select =~
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-17 14:09:04 +00:00
Jeremy Kemper
96cca7db6d ActionView::Base.erb_variable accessor names the buffer variable used to render templates. Defaults to _erbout; use _buf for erubis.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5544 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-17 13:10:23 +00:00
Jeremy Kemper
495f113e57 Template errors: fix strange deprecation warnings on e.g. @flash.inspect, remove deprecated @assigns, handle sources without a discernable line number, clean up code.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5543 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-17 12:47:08 +00:00
Jeremy Kemper
615d05f5de Test autoloading nested subclass of parent.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5541 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-16 22:50:46 +00:00
Marcel Molina
1d31a043e0 Use attr_accessor_with_default to dry up attribute initialization. References #6538. [Stuart Halloway]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5540 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-16 19:36:50 +00:00
Marcel Molina
309a6bd550 Add Module#attr_accessor_with_default to initialize value of attribute before setting it. Closes #6538. [Stuart Halloway, Marcel Molina Jr.]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5539 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-16 19:35:13 +00:00