Neeraj Singh
0027b65421
Ensure that while caching a page rails takes into
...
account the resolved mime type for the request
[#6110 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-12-09 16:14:57 +01:00
José Valim
cc70ac9508
Properly check the arity for template handlers.
2010-12-09 13:15:40 +01:00
José Valim
28cf77203b
Check if the routes object really responds to define_mount_prefix.
2010-12-09 13:15:25 +01:00
Santiago Pastorino
b696dd70db
Allow back passing :rescue_format => nil and test added
2010-12-04 20:08:23 -02:00
Sven Fuchs
896e25e994
Make TranslationHelper#translate use the :rescue_format option in I18n 0.5.0
...
Don't catch exceptions here. Instead only declare that we want exceptions to be rescued as :html, but also let users configure reactions to exceptions in I18n.
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-12-04 18:00:52 +01:00
José Valim
78afe68afb
Merge remote branch 'joshk/redirect_routing'
...
Conflicts:
actionpack/CHANGELOG
actionpack/lib/action_controller/metal/mime_responds.rb
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-12-03 12:27:50 +01:00
Josh Kalderimis
1e26bda095
Added documentation explaining the new additional supported syntaxes for the routing redirect method, a small changelog note, and two extra tests for path interpolation when using the hash option syntax.
2010-11-30 17:55:33 +01:00
Josh Kalderimis
0bda6f1ec6
The redirect routing method now allows for a hash of options which only changes the relevant parts of the url, or an object which responds to call can be supplied so common redirect rules can be easily reused. This commit includes a change where url generation from parts has been moved to AD::Http::URL as a class method.
2010-11-30 16:36:01 +01:00
José Valim
31906eecdf
Fix tests on 1.9.2.
2010-11-28 12:48:50 +01:00
José Valim
a4c360e8c7
trailing star mimes should respect the order in which mime types are defined.
2010-11-28 11:54:00 +01: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
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
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
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
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
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
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
Xavier Noria
799a6fa047
realigns a series of hash arrows
2010-11-21 10:25:23 +01:00
José Valim
d5779efaf2
Ensure calling reset session twice does not raise errors.
2010-11-20 21:56:08 +01:00
Aaron Patterson
938243feb9
do not require ruby-debug automatically. please require it if you have declared it as a dependency
2010-11-19 16:26:09 -08:00
Henning Koch
deff528947
Fix AssetIncludeTag ensuring that files are in the wrong directory [ #6015 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-11-19 15:38:13 -02:00
Santiago Pastorino
52b71c01fd
Revert "Quick fix for not escaping []s (not ideal)"
...
According to http://www.ietf.org/rfc/rfc2616.txt and
http://tools.ietf.org/rfc/rfc3986.txt [ and ] are reserved characters
and should be escaped using "%" HEX HEX
This reverts commit 856d2fd874 and
1ee9b40b18a0bed5bb10a0785f7e2730bac983f6..
2010-11-18 23:31:00 -02:00
José Valim
e3d8331c5b
Revert "Remove deprecated form_for with strings or symbols"
...
This code was not deprecated. What was deprecated is the following:
form_for(:foo, @foo)
Which now should be rewritten as:
form_for(@foo, :as => :foo)
The following format is valid:
form_for(:foo)
This reverts commit be797750e6 .
2010-11-18 20:22:14 +01:00
Leonardo Capillera
be797750e6
Remove deprecated form_for with strings or symbols
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-11-18 16:46:55 -02:00
Aaron Patterson
c52e2cf4b3
delegating path and open to internal tempfile
2010-11-18 10:10:25 -08:00
José Valim
f14c2bf582
Pass the view object as parameter to the handler. Useful if you need to access the lookup context or other information when compiling the template.
2010-11-17 23:50:45 +01:00
Neeraj Singh
fe2f168d40
fix warning during test execution
...
[#5997 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-11-17 20:19:07 -02:00
Carl Lerche
401c1835af
Anchors should be allowed on constraints that are not on path segments
2010-11-16 21:46:15 -08:00
Josh Kalderimis
e1e780a31d
Brought the domain method in AD http url inline with subdomain where @@tld_length is used by default. Also set the default value of @@tld_length to 1.
2010-11-16 18:57:51 +08:00
Josh Kalderimis
6a609dbc82
incorporated most of the feedback from José
2010-11-16 00:04:37 +01:00
Josh Kalderimis
7a38c8b9f5
removed an assert from a test as it was testing a private method
2010-11-16 00:04:36 +01:00
Aaron Patterson
0be181bfa0
make sure we are only doing sanity checking against regular expressions
2010-11-15 13:37:27 -08:00
Santiago Pastorino
293c8a4de5
Tests added for rendering partial with layout, when the partial contains another render layout with block call added missing fixtures
2010-11-13 13:40:36 -02:00
Santiago Pastorino
e3b68e5f6b
Tests added for rendering partial with layout, when the partial contains another render layout with block call
2010-11-13 13:38:40 -02:00
Neeraj Singh
793967cd40
provide better error message if path is uri [ #5914 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-11-11 17:27:47 +01:00