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
Carl Lerche
9a17416d8b
Tweak out url_for uses :script_name and add some tests
2010-03-04 22:00:30 -08:00
Carlhuda
900a2d304a
Get rid of relative_url_path in favor of respecting SCRIPT_NAME. Also added a way to specify a default SCRIPT_NAME when generating URLs out of the context of a request.
2010-03-04 17:43:46 -08:00
Carlhuda
3438373f03
Use AS::Concern for caching modules
2010-03-04 16:59:54 -08:00
Carlhuda
ff29606c06
Refactor cache_store to use ActionController config
2010-03-04 16:50:57 -08:00
Carlhuda
e311622e7b
Deprecated ActionController::Base.session_options= and ActionController::Base.session_store= in favor of a config.session_store method (which takes params) and a config.cookie_secret variable, which is used in various secret scenarios. The old AC::Base options will continue to work with deprecation warnings.
2010-03-04 16:05:52 -08:00
Carlhuda
48bb3b3904
Move stuff from compatibility.rb to deprecated.rb
2010-03-04 16:05:52 -08:00
Carlhuda
1776969627
Move session and session_store onto ActionDispatch and add deprecation warnings
2010-03-04 11:58:30 -08:00
Carl Lerche
7dbf5c820b
Tweak how ActionPack handles InheritableOptions
2010-03-03 21:29:26 -08:00
Carl Lerche
15b3b74624
Fix all the broken tests due to the AC configuration refactor
2010-03-03 21:24:27 -08:00
Carl Lerche
1f0f05b10c
Move the original config method onto AbstractController
2010-03-03 21:24:27 -08:00
Carlhuda
b160663bd1
Start refactoring the method of configuring ActionView
2010-03-03 21:24:01 -08:00
Carlhuda
54302ef55b
Add caller to deprecation notices
2010-03-03 21:24:00 -08:00
Carlhuda
786724107c
Deprecate IP spoofing settings that are directly on the controller in favor of configuring a middleware
2010-03-03 21:24:00 -08:00
Carl Lerche
902d5a4f05
Indicate that ActionController::Base.resource_action_separator is deprecated and only has an effect with the deprecated router DSL.
2010-03-03 21:24:00 -08:00
Carl Lerche
18bcce596e
ActionController::Base.use_accept_header is not actually used anymore, so let's deprecate it.
2010-03-03 21:24:00 -08:00
Carl Lerche
fb14b8c6fd
ActionDispatch::Request deprecates #request_uri
...
* Refactored ActionPatch to use fullpath instead
2010-03-03 21:24:00 -08:00
Carlhuda
5e0a05b8cb
Tweak the semantic of various URL related methods of ActionDispatch::Request
2010-03-03 21:23:34 -08:00
Carlhuda
bcfb77782b
Work on deprecating ActionController::Base.relative_url_root
2010-03-03 15:49:52 -08:00
Carlhuda
6640903481
Move InheritableOptions into ActiveSupport
2010-03-03 15:49:52 -08:00
Carlhuda
bf9913f8f4
Move session_store and session_options to the AC configuration object
2010-03-03 15:49:52 -08:00
Carlhuda
29158d4158
Remove a failed attempt at refactoring AC configuration
2010-03-03 15:49:24 -08:00
Carl Lerche
9dae645c5f
Actually move ImplicitRender into it's own file
2010-03-03 00:43:05 -08:00