Commit Graph

1816 Commits

Author SHA1 Message Date
thoefer
7b39ddafab modified fix #1872 according to jose valim´s suggestions 2011-08-01 11:28:31 +02:00
thedarkone
0753d0bd05 There is no need to be destructive with the passed-in options.
This fixes a bug that is caused by Resource/SingletonResource mangling resource options when using inline "multi"-resource declarations.
2011-07-28 20:18:45 +02:00
David Chelimsky
7fd726d62e Paramify param values in controller tests. 2011-07-25 07:21:42 -05:00
Gaston Ramos
8d0e3c9dc2 - added ActionView::PartialRenderer#merge_path_into_partial(path, partial)
fix issues/1951
2011-07-24 00:24:38 -03:00
Gaston Ramos
1f3f9f1b07 - added test case for issue:
https://github.com/rails/rails/issues/1951
  Namespaced model partial_path is wrong in namespaced controllers
2011-07-23 20:46:06 -03:00
Dieter Komendera
15c8bf1012 Fix fragment cache helper regression on cache miss introduced with 03d01ec7.
Contains following patches cherry-picked from @lhahne's 3-0-stable branch:

* Added tests for the output_buffer returned by CacheHelper (c476a6b)
The output_buffer returned by CacheHelper should be html_safe if the original buffer is html_safe.

* made sure that the possible new output_buffer created by CacheHelper is of the same type as the original (39a4f67)
2011-07-23 22:25:24 +02:00
Jesse Storimer
c24966f4c3 Ensure that status codes are logged properly
Needed to move AC::Metal::Instrumentation before AM::Metal::Rescue
so that status codes rendered from rescue_from blocks are logged
properly.
2011-07-18 15:32:57 -04:00
José Valim
a05d59fe06 Deprecate stream at the class level.
This is because only template rendering works with streaming.
Setting it at the class level was also changing the behavior
of JSON and XML responses, closes #1337.
2011-07-06 20:33:01 -03:00
Damien Mathieu
827e8a5983 provide a more explicit message when using url_for with nil
This fixes the problem of having a non-explicit message when the :location option is not provided in respond_with.
2011-07-03 02:13:53 +02:00
José Valim
e495ad8ddd Make sure respond_with with :js tries to render a template in all cases 2011-06-30 11:48:01 -03:00
Jeroen Jacobs
2b72bb9846 Tests only after filters in cache sweepers 2011-06-23 17:56:37 +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
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
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
Prem Sichanugrist
d77b306b63 Make ParamsWrapper calling newly introduced Model.attribute_names instead of .column_names 2011-05-15 19:07:44 -04: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
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
José Valim
9c2c25c1a1 Revert to old semantics, use available_action? instead of action_method?. 2011-05-06 18:44:18 +02:00
Nick Sutterer
65ceccb0ba controller's prefixes are now added to LookupContext. 2011-05-03 23:41:38 +02:00
Vijay Dev
f490a81443 Fix typos in test method names 2011-05-03 23:35:01 +05:30
Josh Kalderimis
275529446e raise an error if the old router draw method is used, along with a message advising them to either upgrade their routes or add rails_legacy_mapper to their Gemfile 2011-05-03 16:07:25 +02:00
Prem Sichanugrist
31f412fc97 Fix broken params_wrapper_test on 1.8.7 💣
I have to keep in mind that 1.8.7 does *not* preserve the hash order.

Guys, let's move to use 1.9.2 in production!
2011-05-03 16:51:19 +07:00
José Valim
a55f2de0c5 Improve performance for filtered parameters and add tests. 2011-05-03 01:04:57 +02:00
José Valim
4bddc06e83 Move most processing to load time for performance and improve test suite. 2011-05-03 01:04:57 +02:00
Prem Sichanugrist
8c9e4d5202 Add ActionController::ParamsWrapper to wrap parameters into a nested hash
This will allow us to do a rootless JSON/XML request to server.
2011-05-03 03:21:43 +07:00
José Valim
13df194c00 Tidy up pending TODOs after discussion with Mr. Gatoz (@wycats). 2011-05-01 19:39:57 +02:00
José Valim
46611a995d log errors when an exception happens when streaming. 2011-05-01 13:40:14 +02:00
José Valim
6960a230fa Add a test for rendering from the controller context. 2011-05-01 13:40:14 +02:00
misfo
9f6cafd5fd prevent errors when passing a frozen string as a param to ActionController::TestCase#process
since ActionDispatch::Http::Parameters#encode_params will force encoding on all params strings (when using an encoding aware Ruby), dup all strings passed into process.  This prevents modification of params passed in and, more importantly, doesn't barf when a frozen string is passed
thanks and high fives to kinsteronline
2011-04-28 04:07:57 +08:00
David Chelimsky
8d00dfca7f rename test case to better describe use case
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-04-25 09:31:48 +02:00
Florent Piteau
89ed9fbd19 Don't reuse a closed flash when using now 2011-04-20 04:32:26 +08:00
José Valim
069e9b004f Do not stream on HTTP/1.0. 2011-04-19 15:04:28 +02:00
José Valim
b398520c14 Output a redirect to the 500 page if something happens when streaming.
Currently, we output:

  "><script type="text/javascript">window.location = "/500.html"</script></html>
2011-04-19 12:26:11 +02:00
José Valim
6380f1a9f4 Be sure to not store the closed flash in the session. 2011-04-19 10:34:17 +02:00
José Valim
3b0f917b1d Test explicit skip. 2011-04-18 14:27:49 +02:00
José Valim
07fde1a3d3 Just define the controller if fibers are defined. 2011-04-18 14:27:49 +02:00
José Valim
389d15ef13 Body... wanna *stream* my body? Body... such a thrill my body!
Added stream as class level method to make it explicit when to stream.
Render also accepts :stream as option.
2011-04-18 08:55:41 +02:00
Aaron Patterson
c630750fa5 switch to using comments to comment things 2011-04-15 14:13:46 -07:00
José Valim
d6bd606bdd render :once, YAGNI. 2011-04-15 21:11:54 +02:00
David Chelimsky
a26d407f63 ActionView::PathSet# accepts String or Array
- Closes #6692

Signed-off-by: José Valim <jose.valim@gmail.com>
2011-04-13 21:45:51 +02:00
Prem Sichanugrist
733bfa63f5 Remove #among? from Active Support
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now.

It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
2011-04-13 20:25:28 +08:00
Xavier Noria
5850f16935 removes the RJS template handler 2011-04-13 13:23:18 +02:00
Xavier Noria
eea66892c8 removes support for render :update 2011-04-13 13:23:17 +02:00
Xavier Noria
b878757c50 removes assert_select_rjs 2011-04-13 13:23:16 +02:00
David Heinemeier Hansson
d1575ae1b9 Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion! 2011-04-12 00:23:07 +02:00
Prem Sichanugrist
a9f3c9da01 Using Object#in? and Object#either? in various places
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
2011-04-11 03:17:09 +08:00