Jeremy Kemper
b43309328a
Ruby 1.9 compat: ensure binary encoding for post body parsing
2008-05-19 16:24:26 -07:00
Jeremy Kemper
b5c8433a6f
Ruby 1.9 compat: qualify module name within module_evaled block
2008-05-19 12:57:42 -07:00
Chris Hapgood
e6f5079a48
Test for assert_response for failure response without an exception. [ #141 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-19 11:20:36 +01:00
José Valim
99860b72ae
Add fragment_exist? and exist? methods to cache stores. [ #203 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-19 10:38:59 +01:00
Sven Fuchs
345f030c5b
Ensure routing generator works with non-string keys. [ #172 state:resolved]
...
Make sure that (with recent correction to globbed parameter escaping) non-string
values can still be passed route generation helpers for globbed route segments.
For example, foo_path([1, 2, 3]) should still work for a route like map.foo "*globbed"
by implicitely calling to_s on the Fixnums.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-16 17:36:09 +01:00
Joshua Peek
bc3cc91a3f
One last fix to test_filter_parameters_is_protected.
2008-05-14 14:14:23 -05:00
Joshua Peek
f32b974338
Clean up previously commited test.
2008-05-14 13:55:14 -05:00
Joshua Peek
1066b16237
Improve test coverage for filter_parameters [José Valim]
2008-05-14 13:38:02 -05:00
Joshua Peek
8d37bd08ee
Protect #filter_parameters created by filter_parameter_logging [José Valim] [ #196 state:resolved]
2008-05-14 13:00:09 -05:00
Joshua Peek
7708650f73
Added conditional support to caches_action [José Valim] [ #166 state:resolved]
2008-05-14 12:33:54 -05:00
Rich Cavanaugh
d8bcec6ce6
make CGI::Cookie handle deleting a cookie properly
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-05-13 10:51:55 -07:00
rick
74fd17346f
Merge branch 'master' of git@github.com:rails/rails
2008-05-13 09:41:10 -07:00
Rich Cavanaugh
a425cd1473
Don't double-escape cookie store data. Don't split cookie values with newlines into an array. [ #130 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-05-12 15:26:19 -07:00
Peter Jones
2a986200b9
Bug: Earlier Check for Session in Forgery Protection
...
The session is used by the form_authenticity_token method before it is
tested to be valid. This patch moves a few lines around so that the
session is validated first.
Without this patch, if you try to use forgery protection with sessions
turned off, you get this exception message:
undefined method `session_id' for {}:Hash
The patch includes a test that can be used to see this behavior before
the request_forgery_protection.rb file is patched to fix it.
2008-05-11 13:27:34 -05:00
David Heinemeier Hansson
c43623c48b
Added session(:on) to turn session management back on in a controller subclass if the superclass turned it off (Peter Jones) [ #136 state:resolved]
2008-05-11 13:18:49 -05:00
Andreas Neuhaus
74eed6290e
Fixed flash.now not being accessible in tests. Flash sweeping is now done before action processing instead after
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#10 state:resolved]
2008-05-11 18:30:10 +12:00
rick
d09a8446d5
fix merge conflict with actionpack changelog
2008-05-10 17:46:55 -07:00
Jacek Becela
a7ea06b4eb
Make render shorthands work with namespaced controllers
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-10 11:28:19 +01:00
Chris Roos
6776edccf6
Escape globbed parameters in routes correctly.
...
:controller => 'glob', :action=> 'show', :additional => ['foo/bar', 'baz']
Should generate /glob/show/foo%2Fbar/baz not /glob/show/foo/bar/baz
2008-05-10 14:55:41 +12:00
Pratik Naik
e520fd5db7
Delegate action_name to controller inside views.
2008-05-06 12:02:24 +01:00
rick
c8451aeeea
change ActionController::RequestForgeryProtection to use Mime::Type#verify_request? [ #73 ]
2008-05-06 02:58:32 -07:00
Marcos Arias
2c39836dc3
Refactored and fixed Resources.map_member_actions to make use of custom ActionController::Base.resources_path_names when the option :path_names is not directly specified. Added a specific test for this functionality and fixed assert_restful_routes_for test helper to make use of ActionController::Base.resources_path_names instead of just "new" or "edit".
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#111 state:resolved]
2008-05-06 21:48:07 +12:00
rick
0697d17d12
Change the request forgery protection to go by Content-Type instead of request.format so that you can't bypass it by POSTing to "#{request.uri}.xml" [ #73 state:resolved]
2008-05-06 00:42:24 -07:00
rick
37599d16f2
regression test for bug introduced in [ 6a6b4392c1] [Ian White] [ #22 state:resolved]
2008-05-05 23:42:52 -07:00
Cheah Chu Yeow
ee1d508a6b
Allow ActionController::Base#default_url_options to have a default options argument of nil.
...
This fixes a bug introduced in [6a6b4392c1 ] which was breaking routing in ActionController::UrlWriter.
2008-05-05 23:41:33 -07:00
Cheah Chu Yeow
6a6b4392c1
Ensure that default_url_options, if defined, are used in named routes.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#22 state:resolved]
2008-05-04 12:49:44 +12:00
David Heinemeier Hansson
12288a0341
Merge branch 'master' of git@github.com:rails/rails
2008-05-01 17:26:46 -05:00
David Heinemeier Hansson
926f4648f0
Made the location of the routes file configurable with config.routes_configuration_file (Scott Fleckenstein) [ #88 state:resolved]
2008-05-01 17:26:31 -05:00
Tobias Lütke
f48e89931f
Accept header mime parser can now deal with empty fields
2008-05-01 17:45:14 -04:00
Pratik Naik
74436d2203
Fixed render :template for templates in top level of view path. [ #54 state:resolved]
2008-05-01 10:21:46 +01:00
Tobias Lütke
fef82759ff
Implement increment/decrement on cache storage engines, using read/write by default and using atomic command on memcache
2008-04-29 15:12:47 -04:00
Jeremy Kemper
642bcd2d01
Ruby 1.9 compat: force assert_select text encoding to the encoding of the regexp it's matching against.
2008-04-28 10:52:23 -07:00
Eugene Pimenov
e6a3ce3392
Make sure member names aren't mistakenly set to nil when providing :path_names
...
[#19 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-04-23 20:19:22 +12:00
Pratik Naik
a04f022877
Delegate ivars to controller instead of copying
...
Reduce number of instance variables being copied from controller to
view. Instead, delegate them to controller instance.
2008-04-21 11:53:14 +01:00
Pratik Naik
2b69840e5e
Remove ActionController::Base#view_controller_internals
...
Get rid of ActionController::Base#view_controller_internals flag and
use @@protected_view_variables for storing the list of controller
specific instance variables which should be inaccessible inside views.
2008-04-21 03:45:38 +01:00
Paul Horsfall
14a40804a2
Add conditional options to caches_page method [ #25 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-04-19 16:21:34 -05:00
Pratik Naik
ef4c65088f
Move missing template logic to ActionView
2008-04-19 18:59:13 +01:00
Pratik Naik
534c6b2444
Introduce ActionView::InlineTemplate class
2008-04-19 16:21:18 +01:00
Pratik Naik
986aec5dbb
Refactor Dispatcher callbacks to remove unnecessary Dependencies checks in production environment.
2008-04-18 13:05:43 +01:00
Joshua Peek
745359a494
Stub out Dispatcher#log_failsafe_exception method to please the test gods.
2008-04-15 18:04:12 -05:00
David Heinemeier Hansson
420c4b3d88
Added Rails.public_path to control where HTML and assets are expected to be loaded from (defaults to Rails.root + "/public") #11581 [nicksieger]
2008-04-13 17:33:27 -05:00
Michael Koziarski
60be4b09f5
Merge branch 'master' into custom_paths_for_resource_names
2008-04-12 12:40:51 +12:00
Michael Koziarski
063c393bf0
Allow alternative values for the 'new' and 'edit' actions in resourceful routes.
...
map.resource :schools, :as => 'escuelas', :path_names => { :new => 'nueva' }
Closes #11181 . [ivanvr]
2008-04-12 12:40:40 +12:00
Jeremy Kemper
9a7ab8b05b
stub the instance method, there is no class method
2008-04-11 16:46:46 -07:00
David Heinemeier Hansson
e89093aeb4
Fixed that formatted_polymorphic_route should be able to take the :format as part of a single hash or as the option hash (references #8741 )
2008-04-11 12:34:44 -05:00
Rick Olson
4d594cffcf
Automatically parse posted JSON content for Mime::JSON requests. [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9242 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 05:05:54 +00:00
Josh Peek
917423d664
Provide a helper proxy to access helper methods from outside views. Closes #10839 [Josh Peek]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 18:42:34 +00:00
Pratik Naik
1e087fd3fd
Ensure RJS redirect_to doesn't html-escapes string argument. Closes #8546
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 12:48:59 +00:00
Jeremy Kemper
30fa377f33
Ruby 1.9 compat: encoding and multibyte test fixes
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9194 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 07:39:04 +00:00
Jeremy Kemper
ecdddc4de5
Ruby 1.9 compat: proc arity
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9190 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 06:11:56 +00:00