This project is archived and is in readonly mode.
Changeset [6c95e0f879aafa5921cd7898d5951b9a926d3c9a] by Piotr Sarnacki
Revision 6c95e0f879aafa5921cd7898d5951b9a926d3c9a,
committed by Piotr Sarnacki
· September 3rd, 2010 @ 09:59 PM
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)
http://github.com/rails/rails/commit/6c95e0f879aafa5921cd7898d5951b...
9 changed files
-
A
actionpack/lib/action_controller/railties/url_helpers.rb -
R
actionpack/test/dispatch/url_for_test.rb -
M
actionpack/lib/abstract_controller/rendering.rb -
M
actionpack/lib/action_controller/railtie.rb -
M
actionpack/lib/action_dispatch/routing/mapper.rb -
M
actionpack/lib/action_dispatch/routing/route_set.rb -
M
actionpack/lib/action_dispatch/routing/url_for.rb -
M
actionpack/test/dispatch/prefix_generation_test.rb -
M
railties/test/railties/mounted_engine_test.rb