You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
App.absolute_url() doesn't apply subsitution on the provided values in arguments and only uses the default values.
You can find an example in https://github.com/fidalgo/padrino-absolute-url This line should print: Path is http://localhost/face/a2a/CA123/agent/008/answered
As reported in bug padrino#2113 if we are using default values in the
controllers, and those values are present in the URL, they are not being
correctly replaced when building the URL.
The reason is we are using the default values as overrides and not
otherwise, the given values to override the default ones. This patch
fixes this behaviour and introduces a new test to validate it.
As reported in bug #2113 if we are using default values in the
controllers, and those values are present in the URL, they are not being
correctly replaced when building the URL.
The reason is we are using the default values as overrides and not
otherwise, the given values to override the default ones. This patch
fixes this behaviour and introduces a new test to validate it.
Do you want to request a feature or report a bug?
bug
What is the current behavior?
App.absolute_url() doesn't apply subsitution on the provided values in arguments and only uses the default values.
You can find an example in https://github.com/fidalgo/padrino-absolute-url
This line should print:
Path is http://localhost/face/a2a/CA123/agent/008/answered
Also if you add the line:
assert_equal "/pt", @app.url(:index, lang: 'pt')
to https://github.com/padrino/padrino-framework/blob/master/padrino-core/test/test_routing.rb#L1245
I would expect the test to pass
What is the expected behavior?
See previous description
Which versions of Ruby, Padrino, Sinatra, Rack, OS are you using? Did this work in previous versions?
ruby '2.3.3'
'padrino', '0.13.3.3'
sinatra (1.4.7)
Fedora Linux 25
and I suspect it was working on padrino 0.10.6 (yeah a long long time ago)
The text was updated successfully, but these errors were encountered: