Commit Graph

2715 Commits

Author SHA1 Message Date
Bernardo de Pádua
81e6933246 Fix error in number_with_precision with :significant option and zero value [#4306 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-01 07:25:14 +02:00
Jeremy Kemper
3859828d89 HTML safety: give a deprecation warning if an array of option tags is passed to select tag. Be sure to join the tag yourself and mark them .html_safe 2010-03-31 19:51:54 -07:00
José Valim
62151dd272 Deprecate cookie_verifier_secret in favor of config.cookie_secret allowing signed cookies to work again. 2010-03-31 12:59:41 +02:00
José Valim
772a0226fd Add a test which ensures slugs in :id work. 2010-03-31 00:19:40 +02:00
Joshua Peek
cdf8c35ffd Consistent routing language 2010-03-30 14:05:42 -05:00
Joshua Peek
17f0c1e9e8 Fix stack overflow bug in integration test router helpers 2010-03-30 13:58:18 -05:00
wycats
201e8986b1 Updated asset_template_path to asset_path and have it also support a String [#4247 state:resolved] 2010-03-28 18:46:18 -07:00
Craig R Webster
49bc6a249e Allow customisation of asset path generation using a proc.
Set config.action_controller.asset_path_template to a proc that takes one
argument - the direct, unchanged asset path - and returns a path to that asset
using the scheme that your assets require.

This is useful if you have a setup which scales by introducing new application
servers where the mtime of the asset files may not be the same as those of the
asset files on your previous servers, but it does require your web servers to
have knowledge of the asset template paths that you rewrite to so it's not
suitable for out-of-the-box use. An example of configuring asset path
generation and rewriting these paths using Apache is included in
actionpack/lib/action_view/helpers/asset_tag_helper.rb.

Signed-off-by: wycats <wycats@gmail.com>
2010-03-28 18:35:05 -07:00
Rizwan Reza
cf6734fdf9 Add more tests and docs to uncountable routes. [#3930 state:resolved] 2010-03-28 18:34:48 -07:00
Jan De Poorter
72074aac33 Add _index to named collection routes for uncountable resources (e.g. Sheep)
Signed-off-by: Rizwan Reza <rizwanreza@gmail.com>
2010-03-28 18:34:48 -07:00
Paco Guzman
878a9e02f6 html_tag option to wrap error_message_on text [#4283 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-28 17:27:10 -07:00
wycats
77a2a3d9b3 Request#content_type exists in Rack::Request, and other parts of Rack::Request expect
it to return a String. Split the Rails API so that Request#content_type returns
a String, and Request#content_mime_type returns a Mime::Type object.
2010-03-28 13:40:38 -07:00
Andrew White
e1a70faea6 Add constraints to resources in new routing DSL
Signed-off-by: Rizwan Reza <rizwanreza@gmail.com>
2010-03-28 23:31:13 +04:30
wycats
0a352056a4 Fixes a bug where error_messages_for was returning an empty div [#4048 state:resolved] (ht: Geoff Garside) 2010-03-27 03:10:05 -07:00
Daniel Rodríguez Troitiño
334983eca0 Recovers error_messages for ActiveRecordInstanceTag. [#4078 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-27 01:56:20 -07:00
Andrew White
39c35ff04b Fix named routes for member actions of singleton resources [#4266 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-27 00:49:47 -07:00
Rizwan Reza
167017f655 Tests method_missing to raise NameError. [#2522 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-27 00:26:44 -07:00
Andrew White
3d746fcdb5 Add parameter defaults support to new routing DSL [#4265 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-27 00:21:10 -07:00
José Valim
b2c2b0ce45 Rails router automatically calculated for you the controller and named routes in the following scenarios:
match "home/about"                 #=> maps to home#about with named route home_about_path
  match "about"                      #=> does not work because it cannot guess the controller
  match "about" => "home#about"      #=> maps to home#about with named route home_about_path
  match "home/about", :as => "about" #=> maps to home#about with named route about_path
2010-03-26 15:51:51 +01:00
wycats
15c31c7639 open_session can just return the a dup of the current context.
At this point, its entire purpose in the open_session {} case was to
delegate back to the IntegrationTest anyway.
2010-03-22 17:14:28 -07:00
José Valim
c53f77f3be Rename unsignificant to insignificant. 2010-03-23 00:26:12 +01:00
José Valim
13bb4a6e68 Current url helpers become actions in controller. Added a failing test case for it. 2010-03-22 23:57:06 +01:00
Bernardo de Pádua
a4090bca6a NumberHelper methods should now return html_safe strings (when the inputs are valid numbers or are html_safe). Also adds :raise => true (used internaly) to make the number helpers throw InvalidNumberError when the given number is invalid.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-03-22 21:19:49 +01:00
Bernardo de Pádua
75904c566e Adds number_to_human and several improvements in NumberHelper. [#4239 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-03-22 21:19:49 +01:00
José Valim
4998e097cc Make router shortcuts more polite to URLs starting with a leading slash. 2010-03-22 21:07:37 +01:00
wycats
e1c030edd8 Fixed a bunch of tests that failed in 1.9 because they assumed that a Rack response was a String. 2010-03-19 18:46:29 -07:00
José Valim
f28d856cec Improve performance of the rendering stack by freezing formats as a sign that they shouldn't be further modified. 2010-03-19 17:20:20 +01:00
Santiago Pastorino
e629e21135 remove duplicated self.view_paths assingment on controller tests [#4206 state:commited]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-18 17:50:28 -07:00
Carlhuda
1dacc19702 Return a valid Rack response from bare ActionController::Metal 2010-03-18 17:32:53 -07:00
Carlhuda
edb5991a14 Make render :partial, :layout consistent between AC and AV 2010-03-18 16:55:32 -07:00
Carlhuda
71c9337f45 All tests pass without memoizing view_context 2010-03-18 15:52:43 -07:00
José Valim
191a2f78b1 Sending the partial as info is no longer required. 2010-03-18 12:12:07 +01:00
Mathias Biilmann Christensen
c8dd6f224c Deleting and setting a cookie in the same request was broken
Made sure to remove a cookie from @deleted_cookies when set

[#4211 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-17 18:04:32 -07:00
Carlhuda
d9375f3f30 Modify assert_template to use notifications. Also, remove ActionController::Base#template since it is no longer needed. 2010-03-17 16:29:35 -07:00
Carlhuda
6416a35f4b Remove unneeded AV::Base and AV::Template monkey-patches 2010-03-17 14:29:18 -07:00
Carlhuda
947f86c699 Modify assert_template to use instrumentation 2010-03-17 14:29:18 -07:00
Joshua Peek
13a783672a Install url helpers on module instance so they can be accessed
globally
2010-03-17 16:05:29 -05:00
Joshua Peek
d69e5616e8 link_to_function is here to stay 2010-03-16 22:06:16 -05:00
Santiago Pastorino
0c1ac36ccb scope_key_by_partial fix for Ruby 1.9 when there's virtual_path [#4202 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 16:20:10 -07:00
José Valim
56fb60ebfe Fix rendering of HTML partials inside JS templates [#4197 status:resolved] 2010-03-16 23:36:29 +01:00
Santiago Pastorino
12bf636461 translation method of TranslationHelper module returns always SafeBuffer [#4194 status:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 13:49:13 -07:00
Xavier Noria
9659d18c9b adds tests for #flush_output_buffer
[#4196 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 13:16:44 -07:00
Xavier Noria
986cac73e3 adds tests for #capture
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 13:10:54 -07:00
Carlhuda
c61ed70b00 Some more tweaks on <% %>.
* The cache helper is now semantically "mark this region for caching"
  * As a result, <% x = cache do %> no longer works
2010-03-16 11:43:04 -07:00
Jeremy Kemper
b65b989725 Break a window :/ 2010-03-15 23:49:35 -07:00
Jeremy Kemper
b3b6ff48df Fix link_to with block 2010-03-15 23:26:48 -07:00
Jeremy Kemper
b9c48f519f Swear I ran this test 2010-03-15 22:44:49 -07:00
Jeremy Kemper
2a50eabf45 Integration test url options should account for :protocol not just https? 2010-03-15 19:52:41 -07:00
José Valim
8dd731bc50 Move more normalization up to the lookup context, so it does not have to repeat in every resolver. 2010-03-16 02:09:16 +01:00
Xavier Noria
c5a877f142 adds test coverage for with_output_buffer
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-15 16:30:31 -07:00