From 0c181b4b70a703436e608c38fc02cf31db7c915c Mon Sep 17 00:00:00 2001 From: Ivan Vanyak Date: Mon, 17 Dec 2012 14:12:24 +1100 Subject: Add script_name option description and example for #url_for options --- actionpack/lib/action_dispatch/routing/url_for.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_dispatch/routing/url_for.rb b/actionpack/lib/action_dispatch/routing/url_for.rb index 76311c423a..8e19025722 100644 --- a/actionpack/lib/action_dispatch/routing/url_for.rb +++ b/actionpack/lib/action_dispatch/routing/url_for.rb @@ -130,6 +130,7 @@ module ActionDispatch # * :port - Optionally specify the port to connect to. # * :anchor - An anchor name to be appended to the path. # * :trailing_slash - If true, adds a trailing slash, as in "/archive/2009/" + # * :script_name - Specifies application path relative to domain root. If provided, prepends application path. # # Any other key (:controller, :action, etc.) given to # +url_for+ is forwarded to the Routes module. @@ -142,6 +143,10 @@ module ActionDispatch # # => 'http://somehost.org/tasks/testing/' # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', number: '33' # # => 'http://somehost.org/tasks/testing?number=33' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp" + # # => 'http://somehost.org/myapp/tasks/testing' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp", only_path: true + # # => '/myapp/tasks/testing' def url_for(options = nil) case options when nil -- cgit v1.2.3 From 4c41e87e3ae548c44810b66437b2f0f6e73b2106 Mon Sep 17 00:00:00 2001 From: kei Date: Thu, 20 Dec 2012 18:10:21 +0900 Subject: Fix documentation style --- actionpack/lib/abstract_controller/helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/abstract_controller/helpers.rb b/actionpack/lib/abstract_controller/helpers.rb index 36a0dcb2de..812a35735f 100644 --- a/actionpack/lib/abstract_controller/helpers.rb +++ b/actionpack/lib/abstract_controller/helpers.rb @@ -113,7 +113,7 @@ module AbstractController # helpers with the following behavior: # # String or Symbol:: :FooBar or "FooBar" becomes "foo_bar_helper", - # and "foo_bar_helper.rb" is loaded using require_dependency. + # and "foo_bar_helper.rb" is loaded using require_dependency. # # Module:: No further processing # -- cgit v1.2.3 From e1f8ec59f2cc83f052b15233147aa2d6d8114a4d Mon Sep 17 00:00:00 2001 From: kei Date: Thu, 20 Dec 2012 18:24:31 +0900 Subject: Fix incorrect adjustment 4c41e87e3ae548c44810b66437b2f0f6e73b2106 --- actionpack/lib/abstract_controller/helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/abstract_controller/helpers.rb b/actionpack/lib/abstract_controller/helpers.rb index 812a35735f..20f289239f 100644 --- a/actionpack/lib/abstract_controller/helpers.rb +++ b/actionpack/lib/abstract_controller/helpers.rb @@ -113,7 +113,7 @@ module AbstractController # helpers with the following behavior: # # String or Symbol:: :FooBar or "FooBar" becomes "foo_bar_helper", - # and "foo_bar_helper.rb" is loaded using require_dependency. + # and "foo_bar_helper.rb" is loaded using require_dependency. # # Module:: No further processing # -- cgit v1.2.3 From 6fee8f3ce612b01d35b10da20f8bb8510003a5a2 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Fri, 21 Dec 2012 23:03:52 +0530 Subject: Revert "Fix incorrect adjustment 4c41e87e3ae548c44810b66437b2f0f6e73b2106" This reverts commit e1f8ec59f2cc83f052b15233147aa2d6d8114a4d. Reason: seems bad styling [ci skip] --- actionpack/lib/abstract_controller/helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/abstract_controller/helpers.rb b/actionpack/lib/abstract_controller/helpers.rb index 20f289239f..812a35735f 100644 --- a/actionpack/lib/abstract_controller/helpers.rb +++ b/actionpack/lib/abstract_controller/helpers.rb @@ -113,7 +113,7 @@ module AbstractController # helpers with the following behavior: # # String or Symbol:: :FooBar or "FooBar" becomes "foo_bar_helper", - # and "foo_bar_helper.rb" is loaded using require_dependency. + # and "foo_bar_helper.rb" is loaded using require_dependency. # # Module:: No further processing # -- cgit v1.2.3