- 04 9月, 2010 6 次提交
-
-
由 Piotr Sarnacki 提交于
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)
-
由 Piotr Sarnacki 提交于
* added more tests for prefix generation * fixed bug with generating host for both prefix and url * refactored url_for method * organized tests for prefix generation
-
由 Piotr Sarnacki 提交于
A few examples: url_for Blog::Engine, :posts_path url_for Blog::Engine, @post url_for Blog::Engine, :action => "main", :controller => "index"
-
由 Piotr Sarnacki 提交于
It's based specifying application's script_name with: Rails.application.default_url_options = {:script_name => "/foo"} default_url_options method is delegated to routes. If router used to generate url differs from the router passed via env it always overwrites :script_name with this value.
-
由 Piotr Sarnacki 提交于
This requires knowledge about original SCRIPT_NAME and the parent router. It should be pass through the env as ORIGIAL_SCRIPT_NAME and action_dispatch.parent_routes
-
由 Piotr Sarnacki 提交于
This technique is here to allow using routes from Engine in Application and vice versa. When using Engine routes inside Application it should generate prefix based on mount point. When using Engine routes inside Engine it should use env['SCRIPT_NAME']. In any other case it should generate prefix as env should not be even available.
-
- 29 8月, 2010 1 次提交
-
-
由 Joost Baaij 提交于
-
- 30 7月, 2010 1 次提交
-
-
由 Xavier Noria 提交于
-
- 22 7月, 2010 1 次提交
-
-
由 Santiago Pastorino 提交于
options could be of any kind of Hash (Hash, HashWithIndifferentAccess or OrderedHash) this way we keep the properties of the options passed as an argument
-
- 21 7月, 2010 1 次提交
-
-
由 Piotr Sarnacki 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 02 7月, 2010 1 次提交
-
-
由 Piotr Sarnacki 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 23 4月, 2010 1 次提交
-
-
由 Santiago Pastorino 提交于
Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
- 22 4月, 2010 1 次提交
-
-
由 J Smith 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 05 4月, 2010 1 次提交
-
-
由 Andrew White 提交于
-
- 31 3月, 2010 1 次提交
-
-
由 Andrew White 提交于
-
- 27 3月, 2010 1 次提交
-
-
由 wycats 提交于
-
- 16 3月, 2010 2 次提交
-
-
由 Jeremy Kemper 提交于
This reverts commit 5913dd47.
-
由 Jeremy Kemper 提交于
-
- 10 3月, 2010 3 次提交
-
-
由 Joshua Peek 提交于
-
由 Joshua Peek 提交于
-
由 Joshua Peek 提交于
-
- 09 3月, 2010 2 次提交
-
-
由 Jeremy Kemper 提交于
-
由 wycats 提交于
-
- 06 3月, 2010 1 次提交
-
-
由 Jeremy Kemper 提交于
-
- 05 3月, 2010 2 次提交
-
-
由 Carl Lerche 提交于
-
由 Carlhuda 提交于
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.
-
- 27 2月, 2010 3 次提交
-
-
由 Yehuda Katz 提交于
-
由 Carlhuda 提交于
This attr_accessor can be set in a before filter or in the action itself. Overwriting default_url_options still works but will output a deprecation notice.
-
由 Carlhuda 提交于
-
- 26 2月, 2010 2 次提交