Commit Graph

4595 Commits

Author SHA1 Message Date
David Heinemeier Hansson
5410f2cb74 Added the option for extension aliases to mime type registration [DHH] Refactored default mime types to use the extension framework instead of just declaring themselves verbosely
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-02 22:48:20 +00:00
David Heinemeier Hansson
1ac4470da5 Wups
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5662 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-01 23:02:48 +00:00
Jeremy Kemper
8ffb22056c Subclasses of an abstract class work with single-table inheritance. Closes #5704.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-01 21:24:47 +00:00
David Heinemeier Hansson
2e2bf2d149 If only life was that simple (it didnt help)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-01 05:56:51 +00:00
David Heinemeier Hansson
e8eb743ba6 Replace the elaborate reloading connection checking scheme, just fix the Ruby-based MySQL adapter, ye?
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5656 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-01 05:37:56 +00:00
David Heinemeier Hansson
9040f40682 Added one-letter aliases for the three default environments to script/console, so script/console p will load the production environment (t for test, d for development) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5655 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-01 00:08:33 +00:00
David Heinemeier Hansson
cd2be89b7c Refactored to use same option setup
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-30 22:22:02 +00:00
David Heinemeier Hansson
033a5148eb Premature commit
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-30 22:01:58 +00:00
David Heinemeier Hansson
8dca6586de Fixed that script/server running against Mongrel should tail the proper log regardless of the environment [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5652 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-30 21:45:31 +00:00
Jeremy Kemper
ec75642e13 Merge [5645] from 1.2.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-28 23:41:04 +00:00
Jeremy Kemper
13e1d295d6 @response.redirect_url works with 201 Created responses: just return headers['Location'] rather than checking the response status.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5643 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-28 23:25:00 +00:00
Michael Koziarski
f6e85e4ec6 Merge [5641] to Trunk
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5642 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-27 23:56:27 +00:00
Michael Koziarski
02dfb239fa merge 5639 to trunk
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5640 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-27 05:19:15 +00:00
David Heinemeier Hansson
0a86122a24 Only reload connections in development mode that supports (and requires that) -- in other words, only do it for SQLite (closes #6687, #6700) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-26 22:10:55 +00:00
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