thedarkone
8fdb34b237
Cache url_options on a per-request basis.
2010-09-27 17:45:59 +02:00
thedarkone
918dc27345
Compile ActionController::Base.config's methods to avoid method_missing overhead.
2010-09-27 17:45:58 +02:00
Carlos Antonio da Silva
12db1a39cd
Partial revert of #d650b71 'Remove deprecated stuff in ActionController'
...
This brings back the deprecated modules from ActionController, because
they didn't have any deprecation warning.
2010-09-26 02:13:48 +08:00
Carlos Antonio da Silva
7fc1edd790
Remove deprecated stuff in ActionController
...
This removes all deprecated classes in ActionController related to
Routing, Abstract Request/Response and Integration/IntegrationTest.
All tests and docs were changed to ActionDispatch instead of ActionController.
2010-09-26 02:13:45 +08:00
Krekoten' Marjan
8639c10a40
Fix logging when cache key contains % sign [ #5570 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 11:04:20 +02:00
José Valim
6b3ad0cafc
There is no need to use instance_eval since the proc is created in the same context it is eval'ed.
2010-09-24 12:54:31 +02:00
Nando Vieira
7223fe7faf
Make redirect_to accept blocks [ #5643 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 12:49:27 +02:00
Xavier Noria
8c0c815ba7
resolves rdoc conflict
2010-09-23 22:35:08 +02:00
Emilio Tagua
8c97f49f2e
Refactor decode_credentials to avoid inject and use map instead.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-09-22 18:08:03 -03:00
Emilio Tagua
10a63e2a0c
Refactor methods in html node to avoid injects.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-09-22 18:08:02 -03:00
Maxim Chernyak
20685d07ab
Fix header capitalization by explicitly upcasing first letter of every word, and avoiding capitalize. [ #5636 state:resolved]
2010-09-18 20:49:51 +02:00
Diego Carrion
aa654ab065
updated instructions on how to change the default session store
2010-09-18 12:46:21 -03:00
Diego Carrion
a63749483c
updated instructions to generate the migration for the ActiveRecord session store table
2010-09-18 12:46:21 -03:00
Carl Lerche
5ff2b73b48
Small tweak the ConditionalGet documentation
...
Time#utc does not need to be called when passing the object to :last_modified since it is called internally to Rails.
2010-09-17 14:20:35 -07:00
Collin Miller
96650f704a
added block arguments to ActionController::Metal#use
...
Useful for cases such as warden, where a block configuration is taken.
class SomeController < ApplicationController
use RailsWarden::Manager do |manager|
manager.default_strategies :facebook_oauth
manager.failure_app = SomeController.action(:authorize)
end
end
2010-09-12 07:35:54 +08:00
Xavier Noria
a87b92db7b
revises implementation and documentation of csrf_meta_tags, and aliases csrf_meta_tag to it for backwards compatibilty
2010-09-11 11:05:00 +02:00
wycats
f6153f74da
Merge remote branch 'drogus/engines'
2010-09-11 03:24:50 -05:00
Mikel Lindsaar
1a8d77d825
Adding linkage to redirect_to from Base and adding status code option reference
2010-09-09 14:05:06 +10:00
Piotr Sarnacki
18aee33335
Do not require passing :app to mounted helpers, it's actually useless and not DRY
2010-09-08 19:27:59 +02:00
Carlos Antonio da Silva
11fccc5f06
Cleanup deprecation warnings in Action Controller
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-06 13:40:45 +02:00
Piotr Sarnacki
89bd715f6b
Forgot to move that line to railtie on rebase
2010-09-03 22:59:16 +02:00
Piotr Sarnacki
e35c2043b1
Include all helpers from non-namespaced engines
2010-09-03 22:59:13 +02:00
Piotr Sarnacki
98ab4ded37
Set only helpers_path on inherited hook in action_controller/railtie.rb and use helper(:all) just after that
2010-09-03 22:59:13 +02:00
Piotr Sarnacki
e5af8b7d85
Moved ActionMailer and ActionController railties options to inherited hook
...
This change is needed, because we must take namespace into account and if
controller's/mailer's class is namespaced, engine's paths should be set
instead of application's ones.
The nice side effect of this is removing unneeded logic in
ActionController::Base.inherited - now the helpers_path should be set
correctly even for engine's controllers, so helper(:all) will always
include correct helpers.
2010-09-03 22:59:12 +02:00
Piotr Sarnacki
79bd92b783
Refactor ActionMailer to not use hide_actions
2010-09-03 22:59:11 +02:00
Piotr Sarnacki
4131a2d804
Move ActionController::Railties::RoutesHelpers and ActionMailer::Railties::RoutesHelper to AbstractController::Railties::RoutesHelpers
2010-09-03 22:59:11 +02:00
Piotr Sarnacki
befa77fc18
Fix generating urls with mounted helpers in view context
...
There were actually 2 problems with this one:
* script_name was added to options as a string and then it was used
in RouteSet#url_for with usage of <<, which was changing the original
script_name
* the second issue was with _with_routes method. It was called in RoutesProxy
to modify _routes in view_context, but url_helpers in views is just delegating
it to controller, so another _with_routes call is needed there
2010-09-03 22:59:10 +02:00
Piotr Sarnacki
c7664d112f
Include application's helpers and router helpers by default, but include engine's ones for controllers inside isolated namespace
2010-09-03 22:59:10 +02:00
Piotr Sarnacki
2734d3819f
This is not needed
2010-09-03 22:59:10 +02:00
Piotr Sarnacki
6c95e0f879
Add mounted_helpers to routes
...
mounted_helpers are a bit similar to url_helpers. They're automatically
included in controllers for Rails.application and each of mounted
Engines. Mounted helper allows to call url_for and named helpers for
given application.
Given Blog::Engine mounted as blog_engine, there are 2 helpers defined:
app and blog_engine. You can call routes for app and engine using those
helpers:
app.root_url
app.url_for(:controller => "foo")
blog_engine.posts_path
blog_engine.url_for(@post)
2010-09-03 22:59:07 +02:00
Piotr Sarnacki
233be6572c
Ensure that env is always available in controllers
2010-09-03 22:59:06 +02:00
Piotr Sarnacki
b697ba9fd7
Added some more tests for url generation between Engine and Application
2010-09-03 22:59:06 +02:00
Piotr Sarnacki
8a077089d9
Get rid of :skip_prefix options in routes
2010-09-03 22:59:06 +02:00
Piotr Sarnacki
eedbf87d15
New way of generating urls for Application from Engine.
...
It's based specifying application's script_name with:
Rails.application.default_url_options = {:script_name => "/foo"}
default_url_options method is delegated to routes. If router
used to generate url differs from the router passed via env
it always overwrites :script_name with this value.
2010-09-03 22:59:05 +02:00
José Valim
599e46bf24
Revert "Setup explicit requires for files with exceptions. Removed them from autoloading."
...
Booting a new Rails application does not work after this commit [#5359 state:open]
This reverts commit 38a421b34d .
2010-09-02 21:11:03 +02:00
Łukasz Strzałkowski
38a421b34d
Setup explicit requires for files with exceptions. Removed them from autoloading.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-02 11:54:04 +02:00
Thiago Pradi
46c14a6b03
Use join instead of looping and calling to_s [ #5492 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-01 09:46:30 +02:00
José Valim
ba52748d05
Remove deprecated support to <% form_for %> and several ActionController::Base methods.
2010-08-29 21:08:14 -03:00
Xavier Noria
dda515fc26
Merge remote branch 'docrails/master'
2010-08-28 00:01:55 +02:00
Xavier Noria
27d42a56b9
Revert "call-seq directive makes rdoc cry and replaces method names with a curly brace; besides it doesn't add anything when you only list one call example since this is obviously documented already"
...
Reason: Part of this commit touches vendorized stuff, the rest is fine, could you please repatch?
This reverts commit 60de0e56b7 .
2010-08-27 23:30:52 +02:00
Joost Baaij
60de0e56b7
call-seq directive makes rdoc cry and replaces method names with a curly brace; besides it doesn't add anything when you only list one call example since this is obviously documented already
2010-08-27 22:20:53 +02:00
José Valim
625f7b5a5b
Be sure to call helper :all just on direct children. (Tests by Jesse Storimer)
2010-08-26 18:20:22 -03:00
Joost Baaij
6eed7b36a2
escape constant names
2010-08-26 23:10:00 +02:00
Joost Baaij
c28d46a92d
Reflect how CSRF protection now works and refer to the Security Guide for more information
2010-08-26 23:03:30 +02:00
Joost Baaij
ca36326706
cleanup of ActionController::Metal inline documentation
2010-08-26 22:32:40 +02:00
Joost Baaij
930102968a
Escape 'caching' when used in a sentence; remove unnessesary quotes
2010-08-26 21:58:57 +02:00
Joost Baaij
a68919ec84
Restored top-level documentation for ActionController::Base.
...
This information was lost in commit bd6b61be88 .
This might have been intentional, but this class does represent the starting
point for all things related to actions, and as such should document it.
I couldn't find any trace of this documentation, which seems like a waste.
Updated parts here and there to conform to current best practices.
2010-08-25 23:28:56 +02:00
Andrew White
11f6179f55
Reset symbolized path parameters when a test request is recycled [ #5437 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-24 11:24:32 -03:00
José Valim
de0f47afb2
Use attribute readers as they are faster in general.
2010-08-19 15:16:11 -03:00
Santiago Pastorino
b451de0d6d
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
2010-08-14 04:12:33 -03:00