Lee Reilly
4f234bfd79
Corrected some typos and American vs. Queen's English issues
2011-05-29 12:40:24 -07:00
José Valim
a46b03e728
Merge pull request #1203 from dchelimsky/stringify-parameter-values-in-tests
...
Stringify param values in controller tests.
2011-05-28 12:43:13 -07:00
dmathieu
16571f9c42
don't raise an exception if the format isn't recognized
...
Fixed while traveling to heuruko
2011-05-26 11:18:30 +02:00
Josh Kalderimis
d182b6ee9c
removed deprecated methods, and related tests, from ActionPack
2011-05-24 23:38:59 +02:00
Jon Leighton
d411c85a65
Replace references to ActiveSupport::SecureRandom with just SecureRandom, and require 'securerandom' from the stdlib when active support is required.
2011-05-23 20:25:44 +01:00
wycats
7b9f3eb10b
Always initialize @title in caching test to avoid uninitialized instance variable warning
2011-05-22 23:14:52 -07:00
David Chelimsky
9277e72a3c
Stringify param values in controller tests.
...
This reduces false positives that come from using ints in params in
tests, which do not get converted to strings in the tests. In
implementations going through rack, they do get converted to strings.
- David Chelimsky and Sam Umbach
2011-05-22 02:47:54 -04: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
James Robinson
2cdc1f0cd5
Make csrf_meta_tags use the tag helper
...
Improved formatting of csrf_helper and improved test coverage
2011-04-08 02:21:08 +02:00
Aaron Patterson
1e90229e04
many args does not make sense with the current implementation because of how use works
2011-04-06 18:13:16 -07:00
Aaron Patterson
32f876786a
getting the flash hash under test
2011-04-06 18:01:03 -07:00
Aaron Patterson
76c2ea7882
favor composition over inheritance, have FlashHash delegate to a Hash
2011-04-06 17:26:55 -07:00
Santiago Pastorino
0e4748cd41
Make process reuse the env var passed as argument
2011-04-06 16:37:55 -03:00
Santiago Pastorino
d7a5638dfb
raise if someone tries to modify the flash when it was already streamed back to the client or converted to HTTP headers
2011-04-05 10:41:34 -03:00