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
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
Xavier Noria
a594a22267
with_output_buffer cannot assume there's an output_buffer
...
[#4182 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-15 11:26:51 -07:00
Andrew White
96bc6bcfee
Don't force singularization of singleton resource names, e.g. /preferences [ #4089 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2010-03-15 09:45:29 -05:00
Jeremy Kemper
16572fd46e
read_ and write_fragment cache preserve html safety yet cache strings only
2010-03-14 19:09:32 -07:00
Santiago Pastorino
d1eed89ac3
There's a Ruby issue with File.basename different versions returns different things, so we shouldn't test that
2010-03-14 14:57:45 -05:00
José Valim
4ba334c0f4
Ensure controller filters are executed before stuff starts to happen.
2010-03-13 21:28:34 +01:00
Denis Odorcic
e484d4ae56
Made asset_tag_helper use config.perform_caching instead of ActionController::Base.perform_caching
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-03-12 21:33:39 +01:00
José Valim
2a12686832
Allow anything that responds to render to be given as :template and use find_template instead of find in views.
2010-03-12 14:25:10 +01:00
José Valim
4840acd485
%= works for content_tag and does not require parenthesis on method call
2010-03-12 12:08:23 +01:00
José Valim
839362fa07
Make all AP tests pass for Ruby 1.9.1.
2010-03-12 11:50:45 +01:00
Jeremy Kemper
5a7f7928a6
Fix test
2010-03-11 17:49:17 -08:00
Eaden McKee
b27376773e
simplify alt tag generation for images
...
[#2837 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-11 17:33:41 -08:00
José Valim
6c027443b0
Add tests for lookup context.
2010-03-11 13:23:14 +01:00
wycats
4745b53bcd
Merge branch 'master' of github.com:rails/rails
2010-03-10 13:28:52 -08:00
José Valim
84f6da45a1
Merge branch 'master' of gitproxy:rails/rails
2010-03-10 22:17:44 +01:00
José Valim
07cf49aadf
Optimize and clean up how details key get expired.
2010-03-10 22:13:29 +01:00
wycats
7b622786fc
Make form helpers work with <%=
2010-03-09 23:44:12 -08:00
Carlhuda
4464b8e87b
Deprecate block_called_from_erb? pending a solution for getting it into apps
2010-03-09 23:44:12 -08:00
Joshua Peek
dcd110c724
skip_relative_url_root url_for option is dead
2010-03-09 21:25:09 -06:00
Joshua Peek
1cc2a61ea6
Allow default_url_options to be set on route set
2010-03-09 21:20:13 -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
José Valim
ffec153029
Merge branch 'master' of gitproxy:rails/rails
2010-03-09 22:57:15 +01: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
de79525d04
Get rid of the instance-level URL rewriter
2010-03-09 10:20:56 -08:00
José Valim
00d6271d2b
Clean up the API required from ActionView::Template.
2010-03-09 13:12:11 +01:00
Jeremy Kemper
c507e16dba
Reinstate default_url_options and remove url_options= writer
2010-03-08 21:40:45 -08:00
José Valim
8f082ff421
Clean LookupContext API.
2010-03-08 23:25:16 +01:00
Carlhuda
f38e2e0335
Add support for mount RackApp, :at => "/sprockets" with a shorthand of mount Sprockets => "/sprockets".
...
This is different from the match syntax in that it cannot be used for controller/action and it does not
assume an anchor at the end of the match.
For instance, in the above example, if the client asked for "/sprockets/foo.js", the Sprockets app would
have a SCRIPT_NAME of "/sprockets" and PATH_INFO of "/foo.js".
2010-03-08 12:26:18 -08:00
José Valim
7942e90960
Merge master.
2010-03-08 21:06:26 +01:00
José Valim
bdf5096816
Move details to lookup_context and make resolvers use the cache key.
2010-03-08 20:39:15 +01:00
José Valim
68cda695da
Speed up performance in resolvers by adding fallbacks just when required.
2010-03-08 16:32:40 +01:00
José Valim
ea68fe59c6
More refactoring on the views side of rendering.
2010-03-08 14:46:57 +01:00
José Valim
0a85380966
Finally moved the find template logic to the views.
2010-03-08 11:32:01 +01:00
José Valim
ffd8d753f1
Move layout lookup to views.
2010-03-08 02:04:18 +01:00
Jan De Poorter
dfc7ff6429
Make sure nested singular resources get the correct name
...
[#3911 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-07 14:36:26 -08: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