Aaron Patterson
586a944ddd
Tags with invalid names should also be stripped in order to prevent
...
XSS attacks. Thanks Sascha Depold for the report.
2011-08-16 15:24:48 -07:00
Jon Leighton
8e23615245
Use lazy load hooks to set parameter wrapping configuration. This means that it doesn't force Action Controller / Active Record to load, but it doesn't fail if they have already loaded. Thanks @josevalim for the hint.
2011-08-16 19:14:20 +01:00
Jon Leighton
6c5f67cac1
Don't refer to ActionController::Base in the wrap_parameters initializer - use config object instead. Cuts about 15% off the load time. ( #734 )
2011-08-16 00:59:59 +01:00
Franck Verrot
75dd33a0ae
Methods like status and location are interfering with redirect_to [ Closes #2511 ]
2011-08-14 19:00:30 +02:00
Xavier Noria
bf2b9d2de3
Merge branch 'master' of github.com:lifo/docrails
...
Conflicts:
RELEASING_RAILS.rdoc
actionpack/lib/sprockets/railtie.rb
actionpack/test/template/sprockets_helper_test.rb
activerecord/test/cases/calculations_test.rb
railties/guides/source/3_1_release_notes.textile
railties/guides/source/active_resource_basics.textile
railties/guides/source/command_line.textile
2011-08-13 16:30:07 -07:00
Oge Nnadi
aa0d3cece8
Typo fix
2011-08-13 16:22:35 -07:00
thoefer
5f3265c471
Fix the issue where default_url_options is being cached on test cases. Closes #1872 . Closes #2031 .
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-08-13 16:22:26 -07:00
Santiago Pastorino
8845ae683e
x_sendfile_header now defaults to nil and production.rb env file doesn't
...
set a particular value for it. This allows servers to set it through
X-Sendfile-Type, read
https://github.com/rack/rack/blob/master/lib/rack/sendfile.rb for more
info. Anyways you can force this value in your production.rb
2011-08-07 13:11:50 -03:00
thoefer
860202e8b2
Fix the issue where default_url_options is being cached on test cases. Closes #1872 . Closes #2031 .
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-08-01 11:49:24 +02:00
Oemuer Oezkir
71d18ce48e
Changed a few instances of of words in the API docs written in British English to
...
American English(according to Weber)
2011-07-24 10:21:42 +00:00
Jesse Storimer
ac81af40c0
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 13:42:07 -04:00
José Valim
1fdbd4708f
Merge pull request #2009 from vatrai/autoload-todo-new
...
TODO fix explicitly loading exceptations, autoload removed
2011-07-11 07:35:43 -07:00
Vishnu Atrai
525fd3ac86
TODO fix explicitly loading exceptations, autoload removed
2011-07-11 13:14:02 +05:30
Xavier Noria
b65bd01d55
Merge branch 'master' of git://github.com/lifo/docrails
2011-07-09 12:20:24 +02:00
Akira Matsuda
a3683fd0e4
find(:all) => all
2011-07-08 06:13:21 +09:00
José Valim
7da88c5b29
Remove 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:24:30 -03:00
Xavier Noria
289b5253ce
Merge branch 'master' of git://github.com/lifo/docrails
2011-07-05 01:42:13 +02:00
Vijay Dev
2949e30a05
document handle_unverified_request method
2011-07-02 21:18:46 +05:30
Vijay Dev
5fe67fa7a3
update doc about resetting the session in case of authenticity token mismatch
2011-07-01 00:00:38 +05:30
José Valim
9c9ec2172e
Make sure respond_with with :js tries to render a template in all cases
2011-06-30 11:47:36 -03:00
José Valim
c690b7124d
[IMPORTANT] Make "sprockets/railtie" require explicit.
...
This makes "sprockets/railtie" explicit. This means that sprockets will
be loaded when you require "rails/all". If you are not using requiring
"rails/all", you need to manually load it with all other framework
railties.
In order to be complete, this commit also adds --skip-sprockets to
the rails generator.
2011-06-29 09:41:16 -03:00
Esad Hajdarevic
2a61d47b55
Make send_file guess content-type from file extension, if type wasn't supplied (Issue #1847 ). Update tests & documentation.
2011-06-28 06:58:28 +02:00
Matt Jankowski
2fd1f2e843
clarify which url would be used to cache a page when options are not provided to #cache_page to determine that url
2011-06-26 19:44:55 -04:00
Matt Jankowski
eccd5cb610
elaborate on how web server configuration to check for static files on disk enables page caching to work without hitting the app server stack
2011-06-26 19:41:49 -04:00
James Cox
d446c798a5
make the logs a little simpler to view, put the render message inline with other events, pull processing to char[0] and add a new line to the completed. looks more like a block now, which is useful for serial actions like test/dev
2011-06-24 13:10:06 -07:00
Xavier Noria
1f505a8ef2
Merge branch 'master' of git://github.com/lifo/docrails
2011-06-23 18:08:11 +02:00
Matt Jankowski
620bee45fe
more detail on how the flow between redirect and show works, and minor grammar
2011-06-21 10:47:37 -04:00
Jeroen Jacobs
791127eee4
Fixes an issue where cache sweepers with only after filters would have no controller object
...
It would raise undefined method controller_name for nil
2011-06-21 12:34:00 +02:00
Santiago Pastorino
4131fd7c79
Call super here to allow SessionHash initialize new stuff for us
2011-06-19 22:00:22 -03:00
Christine Yen
0a67b745be
Tweak linebreak in ActionController::Redirecting doc
2011-06-15 03:18:28 -07:00
Christine Yen
8da91036c0
Improve documentation around status code argument of redirect_to
2011-06-15 01:55:57 -07:00
Santiago Pastorino
1d3618a9b4
remove warning: assigned but unused variable
2011-06-08 00:26:09 -03:00
Piotr Sarnacki
a6c5cc2377
Added missing assert to test checking form with namespaced isolated model and fixed helpers to work correctly in such case
2011-06-07 02:40:41 +02:00
Xavier Noria
5e21247131
Merge branch 'master' of git://github.com/lifo/docrails
...
Conflicts:
activerecord/RUNNING_UNIT_TESTS
2011-06-06 22:23:30 +02:00
Guillermo Iguaran
c2c8ef57d6
Remove trailing white-spaces
2011-06-05 10:34:40 -05:00
Andrew White
e864ff7259
Add backward compatibility for testing cookies
...
This commit restores the ability to assign cookies for testing via
@request.env['HTTP_COOKIE'] and @request.cookies, e.g:
@request.env['HTTP_COOKIE'] = 'user_name=david'
get :index
assert_equal 'david', cookies[:user_name]
and
@request.cookies[:user_name] = 'david'
get :index
assert_equal 'david', cookies[:user_name]
Assigning via cookies[] is the preferred method and will take precedence
over the other two methods. This is so that cookies set in controller
actions have precedence and are carried over between calls to get, post, etc.
2011-06-05 12:34:27 +01:00
Vijay Dev
fc9ff8cf41
some grammatical corrections
2011-06-04 20:12:25 +05:30
Andrew White
d4658d86fe
Refactor ActionController::TestCase cookies
...
Assigning cookies for test cases should now use cookies[], e.g:
cookies[:email] = 'user@example.com '
get :index
assert_equal 'user@example.com ', cookies[:email]
To clear the cookies, use clear, e.g:
cookies.clear
get :index
assert_nil cookies[:email]
We now no longer write out HTTP_COOKIE and the cookie jar is
persistent between requests so if you need to manipulate the environment
for your test you need to do it before the cookie jar is created.
2011-06-04 07:09:11 +01:00
Guillermo Iguaran
529d2deb5e
Removing trailing white-spaces
2011-05-31 20:55:50 -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
José Valim
ec08bfc035
Merge pull request #1324 from dmathieu/no_error_on_invalid_format
...
Don't raise an exception if the format isn't recognized
2011-05-26 02:29:23 -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
Xavier Noria
00e1d0832e
Merge branch 'master' of git://github.com/lifo/docrails
...
Conflicts:
actionmailer/lib/action_mailer/base.rb
activesupport/lib/active_support/core_ext/kernel/requires.rb
2011-05-25 22:48:47 +02:00
Dmytrii Nagirniak
8f003de2c7
fix minor spelling mistakes in comments
2011-05-23 22:40:29 -07:00
Sebastian Martinez
fcdb5dc557
Remove extra white spaces on ActionPack docs.
2011-05-23 20:22:33 -03: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
David Chelimsky
3f0c71c852
use to_param (and change method to name accordingly)
...
- exclude Rack::Test::UploadedFile to pass existing tests. Are there any
other types we're missing?
2011-05-22 08:13:22 -04: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
José Valim
760dec17be
Use anonymous? that works on both Ruby 1.8 and 1.9.
2011-05-17 14:51:44 -04:00