José Valim
56fb60ebfe
Fix rendering of HTML partials inside JS templates [ #4197 status:resolved]
2010-03-16 23:36:29 +01: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
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
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
José Valim
4ba334c0f4
Ensure controller filters are executed before stuff starts to happen.
2010-03-13 21:28:34 +01:00
José Valim
6c027443b0
Add tests for lookup context.
2010-03-11 13:23:14 +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
de79525d04
Get rid of the instance-level URL rewriter
2010-03-09 10:20:56 -08: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
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
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
Jeremy Kemper
5e3e5ac12b
Clarify cookie jar test
2010-03-04 15:31:28 -08:00
wycats
70916f6a9c
Fixes test ordering bug (ht: evan)
2010-03-04 12:21:12 -08:00
Carl Lerche
5ce25aecee
Merge branch 'configuration_refactor'
2010-03-03 22:35:43 -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
Carl Lerche
eb49bd6949
Fix tests for the request refactor
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
Yehuda Katz
2a60cc6822
don't depend on the order of cookies (Hash ordering bug)
2010-03-03 16:07:23 -08:00
Carlhuda
bcfb77782b
Work on deprecating ActionController::Base.relative_url_root
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
d78e3fe73f
Fix failing Action Pack tests
2010-03-02 14:41:12 -08:00
Jeremy Kemper
9f83cdc38e
No longer add missing leading / on path args to assert_redirected_to. Deprecated in 2.3.6.
2010-03-02 14:16:25 -08:00
Jeremy Kemper
ecfd6d90ee
Action Mailer setup obviated by test bundle
2010-03-02 13:54:59 -08:00
Joshua Peek
7317d9ef4c
Remove implicit controller namespacing from new dsl
2010-02-28 16:39:01 -06:00
Carlhuda
4bdc783d37
1.9 seems to have a bug involving cloned classes and super. Fix it by not cloning (and instead creating classes on demand). The 1.9 bug should be investigated.
2010-02-26 18:25:56 -08:00
Carlhuda
050831803a
If IntegrationSession is initialized with an objects that responds to #routes, automatically extend the URL helpers from the RouteSet onto it
2010-02-26 17:18:45 -08:00
Carlhuda
ab0cc7286f
Setting UrlFor in with_routing is no longer needed now that it's not global
2010-02-26 15:56:38 -08:00
Carlhuda
47fe14bfcc
Silence test deprecation warnings
2010-02-26 15:34:12 -08:00
Carlhuda
98f77e0827
Rename named_url_helpers to url_helpers and url_helpers to url_for
2010-02-26 15:04:50 -08:00
José Valim
bd36418c51
Fix controller_path returnsing an empty string in Ruby 1.8.7 [ #4036 status:resolved]
2010-02-26 11:51:21 +01:00
Carlhuda
f863045c45
Rename metaclass to singleton_class
2010-02-25 17:56:58 -08:00
Carlhuda
8760add31a
Get URL helpers working again in integration tests.
2010-02-25 17:53:30 -08:00
Carlhuda
36fd9efb5e
Continued effort to deglobalize the router
2010-02-25 17:53:01 -08:00
Carlhuda
a278f23310
Fix all of AP's tests with the non global router
2010-02-25 17:53:01 -08:00
Carlhuda
4b038f638d
Merge branch 'master' of github.com:rails/rails
2010-02-25 17:53:01 -08:00
Carlhuda
226dfc2681
WIP: Remove the global router
2010-02-25 17:53:00 -08:00
José Valim
a39c7505bd
Cleanup render callstack and make render(:json => {}, :status => 401) work again.
2010-02-24 22:17:25 +01:00
Carl Lerche
6a061187e2
Remove ActionController::Base.resources_path_names
2010-02-24 10:52:16 -08:00
Yehuda Katz
ae933a093d
Fix render :file => "#{Rails.root}/public/404.html", :status => :not_found. Closes #8994
2010-02-23 22:45:42 -08:00
Carlhuda
24ab5665b2
Revert "Fix test load paths for those not using bundler"
...
This reverts commit eec2d301d4 .
This commit broke tests. You cannot have a file called "bundler" on the load path.
2010-02-23 17:31:17 -08:00
Carlhuda
5e2bd08023
Makes send_file work again by deferring to Rack::Sendfile.
...
* Add the Rack::Sendfile middleware
* Make the header to use configurable via config.action_dispatch.x_sendfile_header (default to "X-Sendfile").
* Add Railties tests to confirm that these work
* Remove the :stream, :buffer_size, and :x_senfile default options to send_file
* Change the log subscriber to always say "Sent file"
* Add deprecation warnings for options that are now no-ops
Note that servers can configure this by setting X-Sendfile-Type. Hosting companies and those creating packages of servers specially designed for Rails applications are encouraged to specify this header so that this can work transparently.
2010-02-23 17:06:35 -08:00
Carlhuda
3345af61fb
Fix streaming by having it create a File object, which can be handled by Rack servers as appropriate
2010-02-23 15:37:17 -08:00