Santiago Pastorino
6062d434f1
Allow view in AV::TestCase to access it's controller helpers methods
2011-01-12 12:14:00 -02:00
Jakub Kuźma
5106ce88e4
authenticity_token option for form_tag [ #2988 state:resolved]
2011-01-09 15:55:26 -08:00
John Allison
5d1d9bfb05
Improve select helpers by allowing a selected value of false. This is useful when using a select helper with a boolean attribute, and the attribute is false. (e.g. f.select :allow_comments)
2011-01-09 15:45:55 -08:00
Rizwan Reza
18605adec3
HTML5 button_tag helper
...
This tag is similar in nature to submit_tag, but allows more control.
It also doesn't submit if submit type isn't used, allowing JavaScript to
control the flow where required.
For more information: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-button-element
2011-01-09 15:22:23 -08:00
Piotr Sarnacki
27ea0481bb
Recreate symlink in layouts for tests
2010-12-31 14:22:27 +01:00
Piotr Sarnacki
8e5d91062f
Don't be so picky on MissingTemplate error details, this fails randomly on 1.8.7 because of not ordered hash
2010-12-31 11:17:37 +01:00
Nick Sutterer
4c44f0468a
added tests for the MissingTemplate exception message.
2010-12-31 10:41:19 +01:00
Timothy N. Tsvetkov
e5b84fd723
ActionController::Base.helpers.sanitize ignores case in protocol
...
[#6044 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-12-30 22:43:43 -02:00
Nick Sutterer
db24701abe
process_action accepts multiple args, even with Callbacks.
2010-12-29 16:37:10 -08:00
wycats
e03e1fdbc8
Speed up template inheritance and remove template inheritance option
2010-12-26 23:56:09 -08:00
wycats
7c568fda6b
A bunch of cleanup on the inherited template patch
2010-12-26 23:44:51 -08:00
artemave
6c5a3bb312
all tests pass
2010-12-26 22:32:15 -08:00
artemave
ce21ea7832
#948 make template inheritance optional
2010-12-26 22:32:15 -08:00
artemave
ddd85ef9c6
#948 template_inheritance
2010-12-26 22:32:15 -08:00
José Valim
d6efd3cfc2
Don't deprecate to_prepare.
2010-12-23 19:21:14 +01:00
José Valim
819b8cae40
Clean up callbacks should also be called on exceptions.
2010-12-23 19:17:02 +01:00
Santiago Pastorino
5853583f9b
Allow registering javascript/stylesheet_expansions to existing symbols
2010-12-22 21:53:24 -02:00
Piotr Sarnacki
09195f10bd
Do not use the same hash instance for expansions [ #6114 state:resolved]
...
Using the same hash instance makes using the same expansions for
both javascripts and stylesheets.
2010-12-22 09:44:46 +01:00
José Valim
0cbfd6c28d
Small changes on AD::Reloader.
2010-12-20 12:43:02 +01:00
John Firebaugh
435bccda93
Replace AD::Callbacks.to_prepare with AD::Reloader.to_prepare
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-12-20 12:43:02 +01:00
John Firebaugh
0f7c970e4f
Introduce ActionDispatch::Reloader
...
Based on the implementation on the 2-3-stable branch, patches by Hongli
Lai <hongli@phusion.nl >, and helpful suggestions from José Valim.
Hongli Lai's patches included locking around the request cycle; this is
now handled by Rack::Lock (https://github.com/rack/rack/issues/issue/87/ ).
[#2873 ]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-12-20 12:43:02 +01:00
Don Wilson
f71809f257
Fixed number_with_precision rounding error [ #6182 state:resolved]
2010-12-18 10:00:37 +01:00
Piotr Sarnacki
07567aea5f
Revert "Fixed number_with_precision rounding error [ #6182 state:resolved]"
...
This reverts commit 006ec77e60 .
2010-12-17 16:11:47 +01:00
Don Wilson
006ec77e60
Fixed number_with_precision rounding error [ #6182 state:resolved]
2010-12-17 11:32:19 +01:00
Pavel Gorbokon
96bae30538
Replace rudimentary named_scope with scope. [ #6052 state:resolved]
...
* rename method names (actually in tests)
* rename instance variable @_named_scopes_cache to @_scopes_cache
* rename references in doc comments
* don't touch CHANGELOG :)
2010-12-15 14:02:30 -08:00
brainopia
ebc47465a5
Fix edge cases for domain :all option on cookie store
...
Dont set explicit domain for cookies if host is not a domain name
[#6002 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-12-16 01:49:30 +05:30
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