- 04 9月, 2010 15 次提交
-
-
由 Piotr Sarnacki 提交于
-
由 Piotr Sarnacki 提交于
There were actually 2 problems with this one: * script_name was added to options as a string and then it was used in RouteSet#url_for with usage of <<, which was changing the original script_name * the second issue was with _with_routes method. It was called in RoutesProxy to modify _routes in view_context, but url_helpers in views is just delegating it to controller, so another _with_routes call is needed there
-
由 Piotr Sarnacki 提交于
For view_context we need to initialize RoutesProxy in context of controller, not view, quick fix, I need to dig into it later
-
由 Piotr Sarnacki 提交于
-
由 Piotr Sarnacki 提交于
-
由 Piotr Sarnacki 提交于
-
由 Piotr Sarnacki 提交于
-
由 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 提交于
-
由 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.
-
由 Piotr Sarnacki 提交于
-
- 03 9月, 2010 1 次提交
-
-
由 José Valim 提交于
Booting a new Rails application does not work after this commit [#5359 state:open] This reverts commit 38a421b3.
-
- 02 9月, 2010 2 次提交
-
-
由 José Valim 提交于
Ensure routes are loaded only after the initialization process finishes, ensuring all configuration options were applied.
-
由 Łukasz Strzałkowski 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 01 9月, 2010 1 次提交
-
-
由 Andrew White 提交于
Move implicit nested call before options handling so that nested constraints work [#5513 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 29 8月, 2010 3 次提交
-
-
由 Joost Baaij 提交于
-
由 Joost Baaij 提交于
Move the default route to the bottom, as this practise should be discouraged. Add documentation for resources, external redirects and Rack applications.
-
由 yury 提交于
1. use map instead of inject 2. use [].join("_") instead of '<<'. It is a little bit faster for ruby 1.9.2 and x2 faster for ruby 1.8.7. http://gist.github.com/548143 [#5450 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 28 8月, 2010 7 次提交
-
-
由 Joost Baaij 提交于
Worse still, its use breaks some rdoc, replacing method names with a curly brace. Having just one call-seq directive doesn't add anything since this is covered by regular rdoc. Having multiple might make sense, but these are already documented with examples. This partly re-reverts 60de0e56 but does not touch the vendorized code in html-scanner.
-
由 Joost Baaij 提交于
-
由 Xavier Noria 提交于
Revert "call-seq directive makes rdoc cry and replaces method names with a curly brace; besides it doesn't add anything when you only list one call example since this is obviously documented already" Reason: Part of this commit touches vendorized stuff, the rest is fine, could you please repatch? This reverts commit 60de0e56.
-
由 Joost Baaij 提交于
-
由 Joost Baaij 提交于
-
由 Joost Baaij 提交于
-
由 Joost Baaij 提交于
call-seq directive makes rdoc cry and replaces method names with a curly brace; besides it doesn't add anything when you only list one call example since this is obviously documented already
-
- 25 8月, 2010 5 次提交
-
-
由 Andrew White 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
由 José Valim 提交于
-
由 José Valim 提交于
If you were using symbols before for methods like match/get/post/put/delete, it is likely that this commit will break your routes. Everything should behave the same if you are using strings, if not, please open up a ticket.
-
由 José Valim 提交于
-
由 José Valim 提交于
-
- 24 8月, 2010 5 次提交
-
-
由 Santiago Pastorino 提交于
-
由 Andrew White 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
由 José Valim 提交于
-
由 José Valim 提交于
Fix a bug where symbols and strings were not behaving the same in the router. [#5431 state:resolved]
-
由 Andrew White 提交于
When custom resource actions are specified using strings add the default name and action if the string is a valid ruby method name. [#5431 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 23 8月, 2010 1 次提交
-
-
由 Andrew White 提交于
Cache the symbolized path parameters using a instance variable in the request object rather than the environment hash. This it to prevent stale parameters in later routing constraints/redirects as only the normal path parameters are set by Rack::Mount. Also if a constraint proc arity is more than one, pass the symbolized path parameters as the first argument to match redirect proc args and provide easier access. [#5157 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-