Commit Graph

4469 Commits

Author SHA1 Message Date
Xavier Noria
9ed919eb0b revises some <%= in rdoc 2010-04-05 02:51:26 -07:00
Xavier Noria
43d02dffcb <% yield to <%= yield in rdoc of _layout_for, and copy-edits it now that we are on it 2010-04-05 02:16:24 -07:00
Rizwan Reza
181e4aac52 We don't need explicit :url => { :action => "create" } in form_for when following Rails conventions. 2010-04-05 06:45:15 +04:30
Xavier Noria
723e91e9fd Merge commit 'docrails/master' 2010-04-04 13:36:15 -07:00
wycats
b546945b51 Reapply redirect {|params, request| } with passing tests this time 2010-04-04 13:17:14 -07:00
Jeremy Kemper
3e5f5f2a48 Revert "Pass in the request as an optional second parameter to redirect"
Was not tested.

This reverts commit a8c3c71af1.
2010-04-04 11:12:19 -07:00
Jeremy Kemper
e3959970e1 Fix signed cookies by explicitly passing config to the cookie jar 2010-04-04 11:10:00 -07:00
Andrew White
00884a5901 Merge branch 'master' of github.com:lifo/docrails 2010-04-04 17:34:23 +01:00
Andrew White
48b2451142 Update various documentation examples to use new routing DSL 2010-04-04 17:34:13 +01:00
Aman Gupta
af89c58696 Use a constant proc to generate ActionView::Template finalizers. For some strange reason, finalizers created via ActionView::Template.finalizer_for cause Template instances to leak on MRI.
Signed-off-by: wycats <wycats@gmail.com>
2010-04-04 02:10:21 -07:00
wycats
a8c3c71af1 Pass in the request as an optional second parameter to redirect 2010-04-03 21:20:45 -07:00
wycats
ab8bf9e152 * Change the object used in routing constraints to be an instance of
ActionDispatch::Request rather than Rack::Request.

* Changed ActionDispatch::Request#method to return a String, to be
  compatible with the Rack::Request superclass.

* Changed ActionDispatch::Request#method to return the original
  method in the case of methodoverride and #request_method not to,
  to be compatible with Rack::Request
2010-04-03 20:24:30 -07:00
Santiago Pastorino
8f9becb426 :action => "create" added to form_for with name only to show appropiate behavior 2010-04-03 18:36:29 -03:00
Santiago Pastorino
10ad15861f :action => "update" used in a non RESTful way confuses 2010-04-03 18:22:58 -03:00
Xavier Noria
11161e6c96 Merge commit 'rails/master' 2010-04-03 10:56:15 -07:00
wycats
3eb97531b8 Refactored url_for in AV to have its own instances of the helpers instead of proxying back to the controller. This potentially allows for more standalone usage of AV. It also kicked up a lot of dust in the tests, which were mocking out controllers to get this behavior. By moving it to the view, it made a lot of the tests more standalone (a win) 2010-04-03 02:44:02 -07:00
wycats
b29e893688 Fix memory leak in dev mode 2010-04-02 19:21:19 -07:00
Jeremy Kemper
ee7605ecf0 Key partial name cache on controller and object class *names* to avoid memory leaks in dev mode 2010-04-02 15:54:38 -07:00
José Valim
997e22c275 Add a test which ensures action_dispatch.show_exceptions is properly disabled. 2010-04-02 20:54:10 +02:00
Rolf Bjaanes
d898a4ba42 Raise exceptions instead of rendering error templates in test environment [#4315 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-02 20:47:42 +02:00
José Valim
a0cdb0499e Maintain the usage of :as consistent in the router. Whenever it's supplied, it changes the NAMED ROUTE. If you want to change the PATH, use :path instead. Example: resources :projects, :path => 'projetos' 2010-04-02 19:13:47 +02:00
Rizwan Reza
0dd3eac967 Merge branch 'master' of git://github.com/rails/rails 2010-04-02 14:57:30 +04:30
Paul Sadauskas
dc5300adb6 Slightly less annoying check for acceptable mime_types. This allows Accept: application/json, application/jsonp (and the like), but still blacklists browsers. Essentially, we use normal content negotiation unless you include */* in your list, in which case we assume you're a browser and send HTML [#3541 state:resolved] 2010-04-01 17:42:46 -07:00
David Heinemeier Hansson
d868cb4f8a Prep for beta2, depend on latest Bundler 2010-04-01 13:36:45 -07:00
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
Xavier Noria
824fa10f4d Merge commit 'rails/master' 2010-03-31 07:47:58 -07:00
José Valim
05337f61f9 yield always return an array, so we don't need to use .key? 2010-03-31 16:02:59 +02:00
Andrew White
1ed1652bef ActionController::Resources has gone away 2010-03-31 14:59:58 +01:00
Andrew White
c10bf8205c Remove routing implementation details from RDoc 2010-03-31 14:54:07 +01:00
Andrew White
e287b53fe3 Update routing documentation to the new way of specifying HTTP method restrictions 2010-03-31 14:19:05 +01:00
Andrew White
7a6b1d54e7 Mark ActionDispatch::Routing::DeprecatedMapper as nodoc to hide old documentation until it's removed 2010-03-31 12:45:29 +01: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
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
4aded43b73 Replace the placeholder base_hook API with on_load. To specify some code that
should run during framework load do:

ActiveSupport.on_load(:action_controller) do
  # Code run in the context of AC::Base
end
2010-03-29 17:08:50 -07:00
José Valim
56bed512f9 Fix dom_id for ActiveRecord [#4296 state:resolved] 2010-03-30 01:32:26 +02: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
c99194c7be Merge remote branch 'rizwan/restrict' 2010-03-28 11:06:46 -07:00
Xavier Noria
76f024ac8d adds missing requires for Object#blank? and Object#present? 2010-03-28 14:15:02 +02:00
Xavier Noria
105f9b8154 adds missing requires for Object#duplicable? 2010-03-28 13:26:13 +02:00
Rizwan Reza
835f5d0269 Rails 3 application can run performance tests now. [#4171 state:resolved] 2010-03-28 15:03:25 +04:30
José Valim
a09e99259c Ensure details are frozen after @details_keys lookup. The implementation waits to freeze until the last required moment, to avoid duping hashes. 2010-03-27 20:52:11 +01:00
wycats
fdebc7f55b Missing require 2010-03-27 12:39:28 -07:00