- 28 11月, 2017 1 次提交
-
-
由 Andrew White 提交于
Fixes #31220.
-
- 24 10月, 2017 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 21 10月, 2017 1 次提交
-
-
由 Akira Matsuda 提交于
This basically reverts e9fca766, d08da958, d1fe1dcf, and 68eaf7b4
-
- 01 9月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
Don't use remove_method or remove_possible_method just before a new definition: at best the purpose is unclear, and at worst it creates a race condition. Instead, prefer redefine_method when practical, and silence_redefinition_of_method otherwise.
-
- 11 7月, 2017 1 次提交
-
-
由 Koichi ITO 提交于
-
- 07 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 06 7月, 2017 1 次提交
-
-
由 David Rodríguez 提交于
-
- 02 7月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
This reverts commit 3420a145, reversing changes made to afb66a5a.
-
- 01 7月, 2017 3 次提交
-
-
由 Akira Matsuda 提交于
-
由 Kir Shatrov 提交于
-
由 Wilson Bilkovich 提交于
CustomUrlHelpers were introduced in ce7d5fb2, closing issue #22512. They currently register themselves in an ivar that is never accessed. This change removes the @custom_helpers special-case, and registers them the way named routes are normally handled. Without this, you can get route_defined?(:example_url) == false, while still being able to call url_helpers.example_url and example_path. Various popular gems such as 'rspec-rails' make use of route_defined?() when determining how to proxy method calls or whether to define a route.
-
- 23 6月, 2017 1 次提交
-
-
由 Jonathan del Strother 提交于
Before this change, handle_positional_args would end up mutating @segment_keys if inner_options included path components. Subsequent calls would then be missing the implicit path components. eg: user_path(1, :json) # => "/users/1.json" (correct) user_path(1, format: :json) # => "/users/1.json" (correct, but @segment_keys was mutated) user_path(1, :json) # => "/users/1" (oh no!)
-
- 19 4月, 2017 1 次提交
-
-
由 Rafael Mendonça França 提交于
Since this protection is now in Parameters we can use it instead of reimplementing again.
-
- 18 3月, 2017 2 次提交
-
-
由 Andrew White 提交于
Action View overrides `url_for` in the view context to render paths by default when using `url_for` and this means that direct route helpers don't get the full url when called with the url suffix. To fix this always call the original `url_for`.
-
由 Andrew White 提交于
Not all requirements can be expressed in terms of polymorphic url options so add a `route_for` method that allows calling another direct route (or regular named route) which a set of arguments, e.g: resources :buckets direct :recordable do |recording| route_for(:bucket, recording.bucket) end direct :threadable do |threadable| route_for(:recordable, threadable.parent) end This maintains the context of the original caller, e.g. threadable_path(threadable) # => /buckets/1 threadable_url(threadable) # => http://example.com/buckets/1
-
- 16 3月, 2017 1 次提交
-
-
由 Andrew White 提交于
In 9b654d47 some params munging was added to ensure that they were set whenever `recognize_path` would call either a proc or callable constraint. Since we no longer mutate the environment hash within the method it's now unnecessary and actually causes params to leak between route matches before checking constraints. Fixes #28398.
-
- 14 3月, 2017 1 次提交
-
-
由 Hrvoje Šimić 提交于
-
- 26 2月, 2017 1 次提交
-
-
由 Jerry Tao 提交于
-
- 22 2月, 2017 1 次提交
-
-
由 Andrew White 提交于
-
- 21 2月, 2017 8 次提交
-
-
由 Andrew White 提交于
Use a separate method called `resolve` for the custom polymorphic mapping to clarify the API.
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-
由 Andrew White 提交于
Using `undef_method` means that when a route is removed any other implementations of that method in the ancestor chain are inaccessible so instead use `remove_method` which restores access to the ancestor.
-
由 Andrew White 提交于
Allow the use of `direct` to specify custom mappings for polymorphic_url, e.g: resource :basket direct(class: "Basket") { [:basket] } This will then generate the following: >> link_to "Basket", @basket => <a href="/basket">Basket</a> More importantly it will generate the correct url when used with `form_for`. Fixes #1769.
-
由 Andrew White 提交于
-
由 Andrew White 提交于
Allow the definition of custom url helpers that will be available automatically wherever standard url helpers are available. The current solution is to create helper methods in ApplicationHelper or some other helper module and this isn't a great solution since the url helper module can be called directly or included in another class which doesn't include the normal helper modules. Reference #22512.
-
由 Andrew White 提交于
The singleton url_for on Rails.application.routes.url_helpers isn't the same as the url_for you get when you include the module in your class as the latter has support for polymorphic style routes, etc. whereas the former accepts only a hash and is the underlying implementation defined on ActionDispatch::Routing::RouteSet. This commit changes the singleton method to call through a proxy instance so that it gets the full range of features specified in the documentation for url_for.
-
- 18 1月, 2017 1 次提交
-
-
由 Jean Boussier 提交于
`AD::Journey::GTG::Simulator` is lazily built the first time `Journey::Router#find_routes` is invoked, which happens when the first request is served. On large applications with many routes, building the simulator can take several hundred milliseconds (~700ms for us). Triggering this initialization during the boot process reduces the impact of deploys on the application response time.
-
- 29 10月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 27 10月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
-
- 03 10月, 2016 1 次提交
-
-
由 Chris Carter 提交于
Currently a misleading "missing required keys" error is thrown when a param fails to match the constraints of a particular route. This commit ensures that these params are recognised as unmatching rather than missing. Note: this means that a different error message will be provided between optimized and non-optimized path helpers, due to the fact that the former does not check constraints when matching routes. Fixes #26470.
-
- 14 9月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
All indentation was normalized by rubocop auto-correct at 80e66cc4. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
-
- 02 9月, 2016 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
- 16 8月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
-
- 07 8月, 2016 4 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 27 4月, 2016 1 次提交
-
-
由 Derek Prior 提交于
I always appreciate having a bit more information as to why something is now an error. We can use this error to tell people why what they were previously doing is insecure and give them hints on how to fix it. Signed-off-by: NKasper Timm Hansen <kaspth@gmail.com>
-