Commit Graph

3489 Commits

Author SHA1 Message Date
Lukáš Konarovský
055a88d345 Use assert_equal instead of assert in uploaded file test. 2011-06-15 13:03:07 +02:00
Damien Mathieu
fa5529366c all requests are utf-8. Don't use the external encoding. 2011-06-15 13:01:30 +02:00
Damien Mathieu
f6fe174168 encode the uploaded file's name in the default external encoding - Closes #869 2011-06-15 13:01:25 +02:00
Andrew White
8624996f9c Make MissingTranslation exception handler respect :rescue_format 2011-06-15 01:21:59 +01:00
Andrew White
c1938d16fd Define ActiveSupport#to_param as to_str - closes #1663 2011-06-12 15:23:12 +01:00
Santiago Pastorino and José Ignacio Costa
41b73fe033 Revert "Make sure that we don't perform in-place mutation on SafeBuffer string"
This reverts commit 317e7c829d.
2011-06-10 23:08:58 -03:00
Prem Sichanugrist
317e7c829d Make sure that we don't perform in-place mutation on SafeBuffer string
This will make sure `render :inline` is working.

Closes #1633
2011-06-10 18:43:59 -04:00
Andrew White
21a8dc7a79 Ensure number helpers can handle HTML safe strings - closes #1597. 2011-06-10 11:21:16 +01:00
Aaron Patterson
58ac641d3e ensuring that json_escape returns html safe strings when passed an html safe string 2011-06-09 15:29:30 -07:00
Prem Sichanugrist
66dbef6d79 Make sure escape_javascript return SafeBuffer if the incoming argument is already html_safe 2011-06-09 14:28:21 -04:00
Paul Gallagher
4663893726 Make escape_javascript happy to handle SafeBuffers
* see GH#1553
* allow for the fact that gsub on SafeBuffer does not pass match variables $1, $2 etc to a block
2011-06-08 11:06:58 -04:00
Guillermo Iguaran
6e9714ca1e Allow multiple sources in Sprockets helpers 2011-06-08 08:13:50 -05:00
wycats
ee018be796 Move the last pockets of Sprockets stuff into the Sprockets directory 2011-06-02 10:59:13 -07:00
wycats
476d679c33 Move javascript/css helpers into the Sprockets helper and just have them override the old behavior 2011-06-02 10:59:13 -07:00
wycats
866889c526 Start moving some logic from being embedded in AV into the Rails Sprockets extensions 2011-06-02 10:59:13 -07:00
jacott
db05478d92 fixed asset_paths when called from sprockets for relative_url_root 2011-05-28 08:50:00 +02:00
dmathieu
9cb8a18200 don't raise an exception if the format isn't recognized
Fixed while traveling to heuruko
2011-05-27 07:50:44 +02:00
Jon Leighton
5a6927ec1e Replace references to ActiveSupport::SecureRandom with just SecureRandom, and require 'securerandom' from the stdlib when active support is required. 2011-05-23 20:24:44 +01:00
Joshua Peek
27159dff0f Add debug_asset support 2011-05-22 15:10:53 -05:00
José Valim
bcdb68155a Merge pull request #1151 from joshk/wrap_params_options_change
renamed the wrap_parameters :only and :except options to :include and :ex
2011-05-19 07:51:11 -07:00
Josh Kalderimis
968596fa7f renamed the wrap_parameters :only and :except options to :include and :exclude to make it consistent with controller filters 2011-05-19 10:33:25 -04:00
steve
2d50887b24 adding test 2011-05-19 10:33:18 -04:00
Arun Agrawal
e3eaeb490a Example Usage updated for actionpack and actionmailer. 2011-05-19 09:17:49 +05:30
José Valim
324f1451b0 Dump and load rack-cache stuff. 2011-05-17 17:33:17 -04:00
David Chelimsky
13950a8cc9 add more robust test for wrapping params with anonymous class 2011-05-17 06:57:14 -04:00
David Chelimsky
14d5e3e459 better test name 2011-05-17 06:56:53 -04:00
David Chelimsky
29e8ca3698 add failing test for https://github.com/rails/rails/issues/1089 2011-05-17 06:56:46 -04:00
José Valim
d043d65396 Merge pull request #570 from sikachu/decouple_actionpack
Make ParamsWrapper use a well-defined API and not rely on AR methods
2011-05-15 16:13:29 -07:00
Prem Sichanugrist
d77b306b63 Make ParamsWrapper calling newly introduced Model.attribute_names instead of .column_names 2011-05-15 19:07:44 -04:00
José Valim
6e581cce1c Merge pull request #568 from carlosantoniodasilva/fields_for_fixes
Fields for fixes for non nested attributes and without object
2011-05-15 15:51:20 -07:00
Prem Sichanugrist
3bed43c6a5 Do not try to call column_names on the abstract class.
Normally the table for abstract class won't be existed, so we should not trying to call `#column_names` on it.
2011-05-15 00:41:20 -04:00
Carlos Antonio da Silva
f0479cbbd5 Refactor fields_for to make the api more clear, and fix usage with non nested attributes and without object 2011-05-14 22:09:12 -03:00
Tom Ward
6d96124284 Reset ActiveRecord::LogSubscriber runtime at the start of each request
Previously the runtime was reset implicitly when #cleanup_view_runtime was called at the end of most requests. However, this doesn't happen when the request redirects, or send_file is called.  Consequently, the ActiveRecord runtime recorded in the logs included the time taken for both the current request and the previous redirect.  Explicitly resetting at the start of each request ensures that this can't happen, no matter what occurs previously.
2011-05-14 10:39:01 +01:00
Tom Ward
518ffcd168 Escape regex in controller_runtime_test to actually check that the ActiveRecord message appears 2011-05-14 10:39:01 +01:00
David Lee
8366cabd65 Test csrf token param name customization 2011-05-10 18:24:14 -07:00
José Valim
a87894ae57 Get around weird missing constant error caused by AS instead of simply raising NameError, closes #477. 2011-05-11 00:08:43 +02:00
Vishnu Atrai
33f0b6b67d minor cleaning 2011-05-10 22:51:54 +05:30
José Valim
3aa8f348ef Fix previous commit by allowing a proc to be given as response_body. This is deprecated and is going to be removed in future releases. 2011-05-10 16:53:57 +02:00
José Valim
4d5ce4738b Merge pull request #446 from danielstutzman/response_body_is_proc
New test: setting response_body to a Proc should be supported.
2011-05-10 07:38:43 -07:00
José Valim
86a0f7f735 Add tests for content_for() for read, closes #475. 2011-05-10 10:22:09 +02:00
José Valim
a9b72fbc9e Optimize the most common resolver case. 2011-05-09 11:17:24 +02:00
José Valim
843cab6f98 Merge pull request #420 from burke/master
Accept single prefix in ActionView::MissingTemplate#initialize
2011-05-08 03:35:14 -07:00
José Valim
30db3a82f6 Merge pull request #430 from dlee/methodoverride
Logs should show overridden method; Issue 426
2011-05-08 03:33:22 -07:00
Daniel Stutzman
2ab42dcc3e New test: setting response_body to a Proc should be supported. 2011-05-07 16:35:56 -06:00
José Valim
0a1ba4eab0 Always expand */* 2011-05-07 23:43:44 +02:00
mathieuravaux
fadd1fa3d3 Fixes ticket #6379. Improved the handling of Accept headers containing */*.
`lookup_context#formats=` being too restrictive, "Accept: text/javascript, */*"
resulted in [:js, "*/*"] formats instead of [:js, :html].

Signed-off-by: José Valim <jose.valim@gmail.com>
2011-05-07 23:35:52 +02:00
José Valim
7d7a353f77 Merge pull request #343 from asanghi/ampm
Allow AM/PM format in datetime selectors
2011-05-07 06:31:18 -07:00
José Valim
0e886fe10e Merge pull request #280 from jballanc/frozen-string-strip-tags
Stripping tags from a frozen string
2011-05-07 03:44:19 -07:00
David Lee
17a91a6ef9 Logs should show overridden method; Issue 426 2011-05-07 03:04:26 -07:00
Burke Libbey
156039c4cf Added a test for MissingTemplate change, and changed to use Array.wrap() as
requested by josevalim.
2011-05-06 14:02:31 -05:00