Commit Graph

867 Commits

Author SHA1 Message Date
Jamis Buck
33e48d5f97 Add a 'referer' attribute to TestRequest
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-19 17:11:26 +00:00
Rick Olson
e7c2c7982f Ensure render :json => ... skips the layout. Closes #6808 [Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-19 04:41:57 +00:00
Rick Olson
d833645cd8 Fix HTML::Node to output double quotes instead of single quotes. Closes #6845 [mitreandy]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-14 20:56:03 +00:00
Jeremy Kemper
2f184c338b Correctly report which filter halted the chain. References #6699.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5715 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-12 22:26:37 +00:00
Nicholas Seckar
d1a2449220 Fix a bug in Routing where a parameter taken from the path of the current request could not be used as a query parameter for the next. Closes #6752.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5709 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-09 04:42:32 +00:00
Jeremy Kemper
a454dcf012 Unrescued ActiveRecord::RecordNotFound responds with 404 instead of 500.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5706 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-08 22:19:00 +00:00
Tobias Lütke
2f9d44e50b Improved auto_link to match more valid urls correctly
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5704 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-07 22:12:48 +00:00
Rick Olson
d0fa4d3e33 Add singleton resources. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5701 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-07 15:36:08 +00:00
Jeremy Kemper
189ecafa53 Update changelog to reflect application/json content type.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5696 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-06 23:10:58 +00:00
Jeremy Kemper
42596543dc respond_to recognizes JSON. render :json => @person.to_json automatically sets the content type and takes a :callback option to specify a client-side function to call using the rendered JSON as an argument. References #4185.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5694 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-06 22:27:08 +00:00
Jeremy Kemper
07423bed4b Bob's raining patches: fixes date_helper bugs and usability issues. References #3811.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-06 19:15:24 +00:00
David Heinemeier Hansson
2794f4164f Dropped the idea of automatically routing :format for the vanilla routes -- that will be a treat for map.resources. Deprecated the name route root as it'll be used as a shortcut for map.connect '' in Rails 2.0 (Rails 1.2). Added map.root as an alias for map.connect '' (Rails 2.0)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-04 00:12:00 +00:00
David Heinemeier Hansson
7611fa6d46 Added Request#format to return the format used for the request as a mime type. If no format is specified, the first Request#accepts type is used. This means you can stop using respond_to for anything else than responses [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-02 23:07:04 +00:00
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
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
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
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
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
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
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
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
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
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
0100a79913 Deprecate standalone components.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5536 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-16 06:40:37 +00:00
Jeremy Kemper
c9e0002d36 assert_select_rjs :remove
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-15 12:45:52 +00:00
Jeremy Kemper
56e3e2fde5 Always clear model associations from session. Closes #4795.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5512 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-13 18:59:01 +00:00
Sam Stephenson
c192bdfc74 Update to Prototype 1.5.0_rc2
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5497 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-12 03:44:35 +00:00
Sam Stephenson
4c7dcb5dbf Remove JavaScriptLiteral in favor of ActiveSupport::JSON::Variable.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5487 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-11 18:29:11 +00:00
Jeremy Kemper
73cc10305e Sync ActionController::StatusCodes::STATUS_CODES with http://www.iana.org/assignments/http-status-codes. Closes #6586.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5482 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-11 01:44:37 +00:00
Jeremy Kemper
57313c54bf assert_response supports symbolic status codes. Closes #6569.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5466 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-07 21:45:10 +00:00
Jeremy Kemper
5c2e9a5e48 Cache parsed query parameters. Closes #6559.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5442 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-06 21:43:21 +00:00
Thomas Fuchs
e52e803a55 Deprecate JavaScriptHelper#update_element_function, which is superseeded by RJS [Thomas Fuchs]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5438 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-06 09:40:30 +00:00
Jeremy Kemper
4d5b913fcf pluralize helper interprets nil as zero. Closes #6474.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5431 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-05 05:04:21 +00:00
Jeremy Kemper
080ec9803e Fix invalid test fixture exposed by stricter Ruby 1.8.5 multipart parsing. Closes #6524.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5429 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-05 02:40:44 +00:00
Jeremy Kemper
7f6c5a5654 Set ActionView::Base.default_form_builder once rather than passing the :builder option to every form or overriding the form helper methods.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5422 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-03 04:16:58 +00:00
Jeremy Kemper
a8bb66ace8 Deprecate expire_matched_fragments. Use expire_fragment instead. Closes #6535.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-02 19:29:40 +00:00
Thomas Fuchs
fe39ac7e56 Update to latest Prototype, which doesnt serialize disabled form elements, adds clone() to arrays, empty/non-string Element.update() and adds a fixes excessive error reporting in WebKit beta versions [Thomas Fuchs]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5371 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-28 16:55:06 +00:00
Rick Olson
d4e35666d1 Deprecate start_form_tag and end_form_tag. Use form_tag / '</form>' from now on. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5347 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-24 03:22:48 +00:00
Rick Olson
f7c916ece6 Added block-usage to PrototypeHelper#form_remote_tag, document block-usage of FormTagHelper#form_tag [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-24 03:06:57 +00:00
David Heinemeier Hansson
e407b44ba1 Made FormTagHelper#form_tag work with blocks, rendering start/end_form_tag deprecated
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5345 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-23 23:30:36 +00:00
David Heinemeier Hansson
6c062054cd Added block-usage to TagHelper#content_tag [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5344 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-23 22:57:59 +00:00
David Heinemeier Hansson
986c1a6240 Deprecated UrlHelper#link_to_image and UrlHelper#link_to :post => true (closes #6409) [BobSilva]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5338 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-22 23:54:41 +00:00
David Heinemeier Hansson
1c71a5d25f Upgraded NumberHelper with number_to_phone support international formats to comply with ITU E.123 by supporting area codes with less than 3 digits, added precision argument to number_to_human_size (defaults to 1) (closes #6421) [BobSilva]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5336 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-22 23:47:18 +00:00
David Heinemeier Hansson
afd288cf81 Fixed that setting RAILS_ASSET_ID to "" should not add a trailing slash after assets (closes #6454) [BobSilva/chrismear]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5335 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-22 23:41:11 +00:00
Rick Olson
1d7196b552 Force *_url named routes to show the host in ActionView [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-20 18:00:20 +00:00
Sam Stephenson
351a224d90 Add support for converting blocks into function arguments in JavaScriptGenerator#call and JavaScriptProxy#call.
Add JavaScriptGenerator#literal for wrapping a string in an object whose #to_json is the string itself.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5323 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-19 22:03:27 +00:00