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
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
Xavier Noria
76f024ac8d
adds missing requires for Object#blank? and Object#present?
2010-03-28 14:15:02 +02:00
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
b20a105ed0
Fixes typo (ht: Claudio Poli) [ #4107 state:closed]
2010-03-26 20:07:00 -07:00
José Valim
395d6648ce
Move application configuration to the application configuration object, remove railtie_name and engine_name and allow to set the configuration object.
2010-03-26 18:47:55 +01:00
wycats
f868c2afa9
response_body is an Array in 1.9, so an Array was being pushed onto the cache
2010-03-19 18:56:06 -07:00
Carlhuda
7f53dca1a1
Fix protect_against_forgery
2010-03-19 11:11:02 -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
Carlhuda
1dacc19702
Return a valid Rack response from bare ActionController::Metal
2010-03-18 17:32:53 -07:00
Carlhuda
71c9337f45
All tests pass without memoizing view_context
2010-03-18 15:52:43 -07:00
Carlhuda
523d0f3700
Remove caching's dependency on view_context. Also, make it so that the layout is always rendered the same way (so that layout dependencies on the action actually being rendered aren't masked on the first render)
2010-03-18 14:55:29 -07:00
Carlhuda
3deb60e6b4
@layout is a confusing name... use @cache_layout
2010-03-18 14:55:29 -07:00
Carlhuda
0e15f07b75
Get modules back into integration tests
2010-03-17 17:52:21 -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
José Valim
a6dc227167
Mark bang instrumentations as something that you shuold not be listening to.
2010-03-17 23:44:03 +01:00
José Valim
21dcbb17de
Ensure json is loaded before using responders.
2010-03-17 23:09:28 +01:00
Carlhuda
947f86c699
Modify assert_template to use instrumentation
2010-03-17 14:29:18 -07:00
wycats
a5587efc19
Remove some 1.9 warnings (resulting in some fixed bugs). Remaining AM warnings are in dependencies.
2010-03-17 00:20:09 -07:00
wycats
cd9ffd11e1
Eliminate warnings for AM on 1.8
2010-03-16 23:24:00 -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
748c78ffc8
RJS may cache an array
2010-03-15 23:48:32 -07:00
Carlhuda
9de83050d3
Add deprecation notices for <% %>.
...
* The approach is to compile <% %> into a method call that checks whether
the value returned from a block is a String. If it is, it concats to the buffer and
prints a deprecation warning.
* <%= %> uses exactly the same logic to compile the template, which first checks
to see whether it's compiling a block.
* This should have no impact on other uses of block in templates. For instance, in
<% [1,2,3].each do |i| %><%= i %><% end %>, the call to each returns an Array,
not a String, so the result is not concatenated
* In two cases (#capture and #cache), a String can be returned that should *never*
be concatenated. We have temporarily created a String subclass called NonConcattingString
which behaves (and is serialized) identically to String, but is not concatenated
by the code that handles deprecated <% %> block helpers. Once we remove support
for <% %> block helpers, we can remove NonConcattingString.
2010-03-15 14:50:43 -07:00
Jeremy Kemper
c937da9e2f
to_str works here
2010-03-15 11:18:45 -07:00
Jeremy Kemper
16572fd46e
read_ and write_fragment cache preserve html safety yet cache strings only
2010-03-14 19:09:32 -07:00
José Valim
4ba334c0f4
Ensure controller filters are executed before stuff starts to happen.
2010-03-13 21:28:34 +01:00
José Valim
f2c0a353ae
Finish cleaning up rendering stack from views and move assigns evaluation to controller (so plugins and/or controllers can overwrite just one method).
2010-03-12 20:39:53 +01:00
Jeremy Kemper
47bc138fc1
Write strings to fragment cache, not outputbuffers
2010-03-11 17:43:29 -08:00
Carl Lerche
8b4dca109a
ActionController::Base.request_forgery_protection_token should actually be the name of the token and not true.
2010-03-11 10:08:18 -08:00
José Valim
84f6da45a1
Merge branch 'master' of gitproxy:rails/rails
2010-03-10 22:17:44 +01:00
José Valim
ec0973c2ab
Remove uneeded methods.
2010-03-10 16:44:24 +01:00
Joshua Peek
dcd110c724
skip_relative_url_root url_for option is dead
2010-03-09 21:25:09 -06:00
Joshua Peek
4d2470f7da
RouteSet#rewrite => url_for
2010-03-09 21:00:24 -06:00
Joshua Peek
7db80f87e9
Move AC::UrlRewriter onto route set
2010-03-09 20:50:35 -06:00
Justin Ko
ea4f8ef33f
Reinstate dom_id in controllers.
...
[#3040 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-09 10:49:36 -08:00
wycats
9444ac9312
Refactor the RouteSet so it uses a Generator object instead of one huge method.
2010-03-09 10:20:56 -08:00
wycats
de79525d04
Get rid of the instance-level URL rewriter
2010-03-09 10:20:56 -08:00
Carlhuda
056042eb82
Simplify the action endpoint:
...
* Remove ActionEndpoint in favor of passing a block to MiddlewareStack
* Always create a Request; the performance win of RackDelegation is around
the response; the Request object hit is limited to a single object allocation
* #dispatch takes a Request
2010-03-08 16:50:00 -08:00
José Valim
8f082ff421
Clean LookupContext API.
2010-03-08 23:25:16 +01:00
Carl Lerche
01f0e47663
Move request forgery protection configuration to the AC config object
...
This is an interim solution pending revisiting the rails
framework configuration situation.
2010-03-08 14:02:41 -08:00
José Valim
7942e90960
Merge master.
2010-03-08 21:06:26 +01:00
José Valim
0a85380966
Finally moved the find template logic to the views.
2010-03-08 11:32:01 +01:00
wycats
54a69c31ed
Typo in config.action_dispatch
2010-03-07 21:27:40 -08:00
José Valim
34b2180451
More refactoring. Split _normalize_args and _normalize_options concerns.
2010-03-08 03:23:23 +01:00
José Valim
4bae77a89b
More cleanup on the layouts side.
2010-03-08 02:58:16 +01:00
José Valim
ffd8d753f1
Move layout lookup to views.
2010-03-08 02:04:18 +01:00
José Valim
c7564d74e8
Added template lookup responsible to hold all information used in template lookup.
2010-03-07 19:41:58 +01:00
wycats
39d6f9e112
Make many parts of Rails lazy. In order to facilitate this,
...
add lazy_load_hooks.rb, which allows us to declare code that
should be run at some later time. For instance, this allows
us to defer requiring ActiveRecord::Base at boot time purely
to apply configuration. Instead, we register a hook that should
apply configuration once ActiveRecord::Base is loaded.
With these changes, brings down total boot time of a
new app to 300ms in production and 400ms in dev.
TODO: rename base_hook
2010-03-07 06:24:30 -08:00