Commit Graph

6654 Commits

Author SHA1 Message Date
Andrew White
1b4e6ca9d8 Simplify regexp 2012-02-17 14:45:48 +00:00
Andrew White
86d3bc37b8 Fix ActionDispatch::Static to serve files with unencoded PCHAR
RFC 3986[1] allows sub-delim characters in path segments unencoded,
however Rack::File requires them to be encoded so we use URI's
unescape method to leave them alone and then escape them again.

Also since the path gets passed to Dir[] we need to escape any glob
characters in the path.

[1]: http://www.ietf.org/rfc/rfc3986.txt
2012-02-17 14:08:13 +00:00
Aditya Sanghi
dffd85a192 backporting #4918 to 3.2 stable; adding extra test for accept header given by googlebot 2012-02-17 15:10:52 +05:30
Santiago Pastorino
7c79996c67 Rack body respond to each and not to join
This fixes undef `to_str' for Rack::Chunked::Body when using
caches_action + streaming on an action

Closes #5027
2012-02-14 21:53:38 -02:00
Aaron Patterson
73fcbaaa78 Merge pull request #4988 from kennyj/fix_4720-3
Fix GH #4720. Routing problem with nested namespace and already camelized controller option.
2012-02-10 10:01:06 -08:00
Ryan McGeary
391e6a47db Fixed force_ssl redirects to include original query params
`ActionController.force_ssl` redirects http URLs to their https equivalent;
however, when a URL contains a query string, the resulting redirect lacked the
original query string.
2012-02-06 17:47:17 -05:00
José Valim
ab44418881 Merge pull request #4908 from kennyj/fix_3864
Fix url_for method's behavior. GH #3684.
2012-02-06 17:03:42 +01:00
José Valim
2bf2055f7a Clean up a bit default_response handling and cache format negotiation. 2012-02-04 16:01:01 +01:00
José Valim
44b9992c11 Merge pull request #4870 from sikachu/3-2-stable-responder-fix
Fix override API response bug in respond_with
2012-02-04 07:00:49 -08:00
José Valim
9cb0e12e46 Merge pull request #4879 from kennyj/fix_4873
Fix GH #4873. Allow swapping same class middleware.
2012-02-04 15:32:40 +01:00
Prem Sichanugrist
567ac65b42 Fix override API response bug in respond_with
Default responder was only using the given respond block when user
requested for HTML format, or JSON/XML format with valid resource. This
fix the responder so that it will use the given block regardless of the
validity of the resource. Note that in this case you'll have to check
for object's validity by yourself in the controller.

Fixes #4796
2012-02-03 14:26:34 -05:00
Aaron Patterson
81f14a5433 Merge pull request #4735 from arton/master
Re-launch assets:precompile task using original $0 if $0 is batch file so it works on Windows
2012-01-31 11:00:17 -08:00
Damien Mathieu
defb751681 don't set the hidden checkbox value if it's nil 2012-01-27 10:06:49 -02:00
Tadas Tamošauskas
19be5ea877 check_box helper with :disabled => true generates disabled hidden field. fixes #1953 2012-01-27 10:06:44 -02:00
Xavier Noria
67b8fbca92 updating RAILS_VERSION 2012-01-26 14:54:02 -08:00
José Valim
c134f24f8f Revert usage of safe constantize
Signed-off-by: José Valim <jose.valim@gmail.com>
2012-01-26 20:52:56 +01:00
Rohit Arondekar
a267090946 remove extra 'the' 2012-01-26 00:01:43 +05:30
Damian Le Nouaille
fd9d394cc3 example bracket error 2012-01-26 00:01:39 +05:30
Aaron Patterson
1d67f1ade7 Merge pull request #4639 from joevandyk/datetime-infinity-select-fix
datetime_select fix for dates of -infinity and +infinity
2012-01-24 15:06:27 -08:00
Rafael Mendonça França
c4b7ca06a4 Fix date_select with discard_month and discard_year options
Closes #4553 and #4633
2012-01-24 16:38:08 -02:00
Joe Van Dyk
59a408eb64 datetime_select should work with -/+ infinity dates 2012-01-24 10:30:46 -08:00
Indrek Juhkam
d92b5fe07c Fix date_select nil and blank and order case 2012-01-24 16:03:16 -02:00
Aaron Patterson
3913b510b7 Added custom regexps to ASTs that have literal nodes on either side of
symbol nodes.  Fixes #4585
2012-01-23 17:21:29 -08:00
José Valim
334e5cab2a Merge pull request #4604 from ihid/3-2-stable
3-2-stable: Fixed regression - unable to use a range as choices for form.select.
2012-01-22 06:09:35 -08:00
Jeremy Walker
c6dcc3537c Allow form.select to accept ranges. 2012-01-22 13:39:15 +00:00
Jonathan Roes
c70135807e document :raise option support for several helpers [ci skip] 2012-01-21 21:34:49 +05:30
David Heinemeier Hansson
f36dcaf488 Preparing for 3.2.0 release 2012-01-20 17:44:32 +01:00
José Valim
08d6eb6824 Do not deprecate performed? 2012-01-19 19:45:22 +01:00
Simon Baird
00554568e0 Fix small typo in mail_to docs in url_helper.rb 2012-01-19 22:13:42 +05:30
Guillermo Iguaran
02e4d7ffd4 Silent Sprockets logger when config.assets.logger is set to false 2012-01-18 07:55:49 -05:00
Carlos Antonio da Silva
786a0b7475 Remove duplicated constant definition
ActionController::ActionControllerError is already defined in
action_controller/metal/exceptions.
2012-01-17 18:07:08 -02:00
Carlos Antonio da Silva
e5e87041ce Deprecate AC::UnknownError and AC::DoubleRenderError
Use the constants AbstractController::ActionNotFound and
AbstractController::DoubleRenderError respectively instead.
2012-01-17 18:07:08 -02:00
Carlos Antonio da Silva
9d4fd613a6 Add default charset config to ActionDispatch 2012-01-17 18:07:08 -02:00
Carlos Antonio da Silva
57be2cfa1e Deprecate default_charset= at controller level 2012-01-17 18:07:08 -02:00
Carlos Antonio da Silva
20baeece91 Add some deprecations for logic being removed in 4.0 2012-01-17 18:07:08 -02:00
Rafael Mendonça França
c4c6bebecf Add option to configure Sprockets logger 2012-01-17 14:36:23 -03:00
José Valim
78ef738313 Add begin/ensure block since we are returning. 2012-01-14 09:18:57 +01:00
Santiago Pastorino
c159b01b85 Use a BodyProxy instead of including a Module that responds to close.
Closes #4441 if Active Record is disabled assets are delivered correctly
2012-01-13 19:44:44 -02:00
codesnik
96d4da1719 Made an example a little more realistic 2012-01-11 20:24:17 +05:30
Santiago Pastorino
3375a093e9 Rails initialization with initialize_on_precompile = false should set assets_dir 2012-01-10 16:34:13 -02:00
Piotr Sarnacki
d65b766426 Fix http digest authentication with trailing '/' or '?' (fixes #4038 and #3228) 2012-01-10 04:42:46 +01:00
Piotr Sarnacki
79b12a0ffb Add original_fullpath and original_url methods to Request 2012-01-10 04:39:53 +01:00
kennyj
205674408b Don't fork a process when assets:precompile:nondigest is invoked in assets:precompile:all. Improve GH #3694. 2012-01-07 00:29:05 +09:00
Tsutomu Kuroda
22f901cc9d Infer currency negative format from positive one.
When a locale file sets the format of the positive
currency value as '%n %u', the default negative
currency format should be '-%n %u'.

Cherry-picked from master (6724c8c8)
2012-01-05 11:08:09 +09:00
Santiago Pastorino
d268ef2f65 Bump to rc2 2012-01-04 18:59:41 -02:00
Vijay Dev
4b2b595992 copy edits 2012-01-04 20:20:52 +05:30
Pablo Ifran
00a27c52ea improve doc in number helper options 2012-01-04 20:20:48 +05:30
Aaron Patterson
e9122112fa Revert "Named Routes shouldn't override existing ones (currently route recognition goes with the earliest match, named routes use the latest match)"
This reverts commit 71d769e3b5.
2012-01-03 13:56:12 -08:00
Santiago Pastorino
8c129f18d2 Pass extensions to javascript_path and stylesheet_path helpers. Closes #3417 2012-01-03 17:51:10 -02:00
José Valim
d38dac8ea9 Override respond_to? since we are also overriding method_missing. 2012-01-03 20:27:38 +01:00