Jeremy Kemper
d9f3c435f9
Fix url_for, redirect_to, etc. with :controller => :symbol instead of 'string'. Closes #8562 , #9525 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 19:12:02 +00:00
Jeremy Kemper
52ca5dad1e
Use StringIO and Tempfile subclasses instead of defining singleton methods on each multipart field.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7759 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 11:40:13 +00:00
Jeremy Kemper
3405fb3dea
Rewind stdin if possible after multipart parsing.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7758 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 09:39:31 +00:00
Rick Olson
904df818d6
Move ActionController::Routing.optimise_named_routes to ActionController::Base.optimise_named_routes. Now you can set it in the config.
...
ActionController::Routing::DynamicSegment#interpolation_chunk should call #to_s on all values before calling URI.escape. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7724 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-03 05:47:41 +00:00
Jeremy Kemper
0ee1cb2cd3
Ruby 1.9 compat, consistent load paths
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-02 05:32:14 +00:00
David Heinemeier Hansson
860cf2d44e
Fixed that render template did not honor exempt_from_layout ( closes #9698 ) [pezra]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7701 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-30 22:59:24 +00:00
David Heinemeier Hansson
7275d2749c
Fixed JSON encoding to use quoted keys according to the JSON standard ( closes #8762 ) [choonkat/chuyeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-30 20:57:50 +00:00
Michael Koziarski
9660360d6b
Re-enable Routing optimisation code for _url methods, add defined?(request) to the guard conditions
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7673 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 20:57:39 +00:00
Rick Olson
82ff27766d
Better error messages if you leave out the :secret option for request forgery protection. Closes #9670 [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 16:50:48 +00:00
Michael Koziarski
c1bdf027d8
Add missing require
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 16:48:59 +00:00
Rick Olson
5edc81dcc2
Allow ability to disable request forgery protection, disable it in test mode by default. Closes #9693 [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 15:55:45 +00:00
David Heinemeier Hansson
e3b49c052b
Fixed spelling errors ( closes #9706 ) [tarmo/rmm5t]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 14:18:47 +00:00
David Heinemeier Hansson
3c695356ae
Fixed the layout defaults ( closes #9564 ) [lifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 01:23:20 +00:00
Jeremy Kemper
f08da31a4f
Move Railties' Dispatcher to ActionController::Dispatcher, introduce before_ and after_dispatch callbacks, and warm up to non-CGI requests.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7640 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-26 01:24:07 +00:00
David Heinemeier Hansson
82c1fed89f
Protect button_to behind protect_from_forgery ( closes #9675 ) [lifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7636 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-25 16:50:35 +00:00
David Heinemeier Hansson
7ca53e1d31
Added another failing test
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7632 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-25 16:37:43 +00:00
David Heinemeier Hansson
06dd4b3166
Better failing tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7630 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-25 15:09:21 +00:00
David Heinemeier Hansson
55a9c86e62
Added failing tests for iphone
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-25 14:57:15 +00:00
David Heinemeier Hansson
501244fee4
Updated iphone_with_html_response_type to fail as it uses the new register_alias approach
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7625 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-24 23:44:36 +00:00
David Heinemeier Hansson
bdf5672077
Change from InvalidToken to InvalidAuthenticityToken to be more specific
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-24 23:12:25 +00:00
Jeremy Kemper
cb5b8a7f05
Optimized named routes respect AbstractRequest.relative_url_root. Closes #9612 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7605 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 22:52:57 +00:00
Jeremy Kemper
6580b3ab00
Remove , and ; (comma and semicolon) from routing separators again. References #8558 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7599 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 21:58:02 +00:00
David Heinemeier Hansson
7d9fe04b1d
Fixed cache_page to use the request url instead of the routing options when picking a save path ( closes #8614 ) [josh]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7598 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 21:56:52 +00:00
Jeremy Kemper
a6f49d9b78
Introduce ActionController::Base.rescue_from to declare exception-handling methods. Cleaner style than the case-heavy rescue_action_in_public. Closes #9449 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7597 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 21:56:22 +00:00
Rick Olson
c619003854
Rename some RequestForgeryProtection methods. The class method is now #protect_from_forgery, and the default parameter is now 'authenticity_token'. [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 18:14:44 +00:00
Rick Olson
4e3ed5bc44
Merge csrf_killer plugin into rails. Adds RequestForgeryProtection model that verifies session-specific _tokens for non-GET requests. [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7592 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 02:32:55 +00:00
Michael Koziarski
7573791284
Disable the routing optimisation code when dealing with foo_url helpers. Add test to actionmailer to expose the problem they introduced. References #9450 [Koz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7572 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-22 19:20:06 +00:00
Jeremy Kemper
28f7de07cb
Test CGI::Cookie#to_s. Closes #9624 [tarmo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7535 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-22 09:01:33 +00:00
Michael Koziarski
9b468f4cd7
[html-scanner] Fix parsing of empty tags. Closes #7641 . [anthony.bailey]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7528 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-21 20:45:49 +00:00
David Heinemeier Hansson
eede82ccb9
Added support for HTTP Only cookies (works in IE6+ and FF 2.0.5+) as an improvement for XSS attacks ( closes #8895 ) [lifo/Spakman]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-21 15:05:49 +00:00
David Heinemeier Hansson
4156497602
Fixed CaptureHelper#content_for to work with the optional content parameter instead of just the block #9434 [sandofsky/wildchild]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-21 03:40:25 +00:00
David Heinemeier Hansson
0d99423727
Fixed that default layouts did not take the format into account #9564 [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7514 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-18 23:10:34 +00:00
Michael Koziarski
7cb26b5d2d
Disable optimisation code for UrlWriter as request.host doesn't make sense there.
...
Don't try to use the .to_query method when the route has no dynamic segments.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7501 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-17 09:30:18 +00:00
Jeremy Kemper
148202d401
Fixed optimized route segment escaping. Closes #9562 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7487 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-15 22:10:20 +00:00
Jeremy Kemper
494d2c631b
root_path returns '/' not ''. Closes #9563 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7482 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-15 20:38:39 +00:00
David Heinemeier Hansson
d48039cefb
Fixed that setting request.format would also affect respond_to blocks [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7479 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-15 04:18:32 +00:00
Jeremy Kemper
c87206cc57
Add option to force binary mode on tempfile used for fixture_file_upload. Closes #6380 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-14 07:34:45 +00:00
David Heinemeier Hansson
b611c685d9
Fixed that resource namespaces wouldnt stick to all nested resources ( closes #9399 ) [pixeltrix]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7447 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-10 14:31:44 +00:00
David Heinemeier Hansson
46f217b298
Removed deprecated form of calling xml_http_request/xhr without the first argument being the http verb [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-09 23:00:17 +00:00
David Heinemeier Hansson
f7b0bc9ea3
Removed deprecated ActionController::Base.cookie (use ActionController#Base.cookies[]= instead)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7435 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-09 22:56:15 +00:00
David Heinemeier Hansson
4cfc60a6c8
Removed deprecated ActionController::Base.cookie (use ActionController#Base.cookies[]= instead)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-09 22:55:16 +00:00
David Heinemeier Hansson
6b0a647236
Removed ActionController::Base#keep_flash (use flash.keep instead)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7428 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-09 21:54:59 +00:00
David Heinemeier Hansson
89b7630627
Removed the deprecated ActionController#Base.template_root/= methods (use ActionController#Base.view_paths/= instead) [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-09 18:00:55 +00:00
Michael Koziarski
80ff0b9f1c
Optimise named route generation when using positional arguments. Closes #9450 [Koz]
...
This change delivers significant performance benefits for the most
common usage scenarios for modern rails applications by avoiding the
costly trip through url_for. Initial benchmarks indicate this is
between 6 and 20 times as fast.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7421 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-09 00:18:55 +00:00
Jeremy Kemper
f1b12b62f4
Fix layout overriding response status. Closes #9476 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7418 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-08 03:12:03 +00:00
Michael Koziarski
32553a2d76
Fix assert_select for XML documents. Closes #8173 . [dasil003]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7417 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-08 01:32:16 +00:00
Michael Koziarski
fe31f0e066
Add a user_agent to TestRequest
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-07 03:45:54 +00:00
Tobias Lütke
68d685056a
Remove deprecated named routes [pixeltrix]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7415 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-06 14:28:32 +00:00
Michael Koziarski
a75d273ece
Allow additional parameters to be passed to named route helpers when using positional arguments. Closes #8930 [ian.w.white@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7411 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-05 23:37:17 +00:00
Michael Koziarski
f81dae3fca
Remove deprecated functionality from actionpack. Closes #8958 [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7403 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-03 00:18:30 +00:00