Commit Graph

6404 Commits

Author SHA1 Message Date
Akira Matsuda
1662aa1a15 Added a space before "do" keyword 2010-11-28 09:42:19 +09:00
Xavier Noria
fd83f9d515 Merge branch 'master' of git://github.com/lifo/docrails 2010-11-27 07:43:59 +01:00
Ryan Bigg
167964149e Add explicit statement that verify_authenticity_token can be turned off for actions. 2010-11-27 07:57:10 +11:00
Aditya Sanghi
5b9f6a74db Resolving LH #5986, cookies doc updates 2010-11-26 16:41:33 +05:30
Santiago Pastorino
74049b57fb implicit self here 2010-11-25 21:31:14 -02:00
Josh Kalderimis
a98d9d65ae move the setting up of the mime collector into the collector on init
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-25 21:24:45 -02:00
José Valim
731ca00b48 Dynamically generaeted helpers on collection should not clobber resources url helper [#6028 state:resolved] 2010-11-25 11:50:29 +01:00
José Valim
90b0f61491 #:nodoc: internal methods. 2010-11-25 11:50:28 +01:00
raggi
cb1570936d Rakefiles are executables, and rake loads rake, not rakefile code 2010-11-25 06:49:55 +08:00
Neeraj Singh
fa2a5ae033 If a user wants json output then try best to render json output. In such cases prefer kind_of(String) over respond_to?(to_str)
[#5841 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-24 22:08:36 +01:00
Neeraj Singh
18adbe9347 process text/* if it appears in the middle of
HTTP_ACCEPT parameter
2010-11-25 04:38:51 +08:00
Neeraj Singh
5c9abb6cca processing image/* is an odditity because there is
a test case which expects image/* to not to be
expanded. So I am leaving image/* as it is and
process only text/* and application/*
2010-11-25 04:38:50 +08:00
Neeraj Singh
b52a6ba169 clean up test by using unregister method 2010-11-25 04:38:50 +08:00
Neeraj Singh
e870883625 unregister method implementation and test 2010-11-25 04:38:47 +08:00
Neeraj Singh
c6030e8562 Remove the not needed setup and teardown 2010-11-25 04:38:45 +08:00
José Valim
8624065bff Allow template handlers to store temp data. 2010-11-24 12:38:52 +01:00
Josh Kalderimis
e39138478b port_string bought back to life as it is part of the public api
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-24 10:34:18 +01:00
Neeraj Singh
8882e65ac8 No need to return anything 2010-11-24 08:00:40 +08:00
Ryan Bigg
e4a9af186a Add mention of nested resource to resources documentation 2010-11-24 09:31:29 +11:00
Ryan Bigg
fd47a4bf43 Document the :path option for resources :posts 2010-11-24 09:28:21 +11:00
Ryan Bigg
01af50d8b6 Add :module option documentation for the resources method 2010-11-24 09:27:12 +11:00
Ryan Bigg
2974f57aae Remove non-sensical first couple of lines for scope method documentation 2010-11-24 09:25:01 +11:00
Ryan Bigg
04af510b56 Paths in ActionDispatch::Scoping documentation should be for /admin/posts, not /admin/photos 2010-11-24 09:21:25 +11:00
Ryan Bigg
769575300a Fix formatting issue with rake routes output for the namespace method 2010-11-24 09:19:27 +11:00
Xavier Noria
0250c3eca4 copy-edits RDoc of 2fe43b6 2010-11-23 22:51:51 +01:00
José Valim
da583df50c Remove bazillion warnings from AP suite. 2010-11-23 10:09:24 +01:00
José Valim
56b1214024 Speed up subdomain and domain calculus. 2010-11-23 10:05:47 +01:00
Josh Kalderimis
2fe43b694f :subdomain, :domain and :tld_length options can now be used in url_for, allowing for easy manipulation of the host during link generation.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-23 09:54:42 +01:00
Aaron Patterson
e83d15376d adding a test for the runner module [#6027 state:resolved] 2010-11-22 15:57:03 -08:00
Aaron Patterson
4395d493c5 sort lists before comparing them 2010-11-22 15:51:29 -08:00
Sven Fuchs
5c86286dd6 add respond_to? to ActionDispatch::Integration::Runner
since Runner uses method_missing to delegate to the integration session it also should define respond_to? accordingly
2010-11-22 15:42:28 -08:00
Neeraj Singh
21fd93cedd make test more resilient to future changes by not
testing the count and not testing the internal value
of the registered mime type.

Ideally all mime type registration should be cleaned up
in teardown.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:15 +01:00
Neeraj Singh
794b34306e remove select, collect and then inject with
something better

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:15 +01:00
Neeraj Singh
c5bfc6abe4 string include method is 10x faster than creating
a new regex object every single time

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
8154f4b816 Compile regex only once
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
cdbbf6fd6b move the mime registration code to setup so that
it could be cleaned up on teardown.

Currently the test code
test/controller/mime_responds_test.rb impacts
test/dispatch/mime_type_test.rb.

dispatch/mime_type_test.rb runs independently fine
but when run as part of rake breaks because of
new mime types registered in
controller/mime_responds_test.rb

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
23ea19e20d rename star star to just one star
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
c9147ebfa0 cleanup Mime::LOOKUP after registering image/gif
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
4154c659fe fix test
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
6f6e754bac implement code that handles text/*, appplication/*,
and image/*

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +01:00
Neeraj Singh
b798a59bd5 test for text/*, application/* and image/*
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +01:00
Neeraj Singh
d04a21b362 declare regex as a constant
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +01:00
Neeraj Singh
cbb2651cc0 add the fixture file
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +01:00
Neeraj Singh
eb6ccc9953 do not assume that there is no space between
leading */* and comma

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:12 +01:00
Neeraj Singh
f5fba917f8 failing test for #6022
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:12 +01:00
Neeraj Singh
61950a4b05 current code ignores http header "Accept" if it
has ....,*/* .

It is possible to a device to send
request such that */* appear at the beginning of the
"Accept" header. This patch ensures that "Accept" header
is ignored for such cases too.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:12 +01:00
Santiago Pastorino
c937ddb5ce Remove unused constant 2010-11-22 19:00:05 -02:00
Santiago Pastorino
6e559168dc There's no need for ternary op here 2010-11-22 18:47:47 -02:00
Santiago Pastorino
559c4292bc Remove unneeded metaprogramming and method generation in favor of direct definition 2010-11-22 16:02:13 -02:00
Xavier Noria
799a6fa047 realigns a series of hash arrows 2010-11-21 10:25:23 +01:00