Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default variable values seem to be not supported by Template #162

Open
abotalov opened this issue Jul 9, 2014 · 2 comments
Open

Default variable values seem to be not supported by Template #162

abotalov opened this issue Jul 9, 2014 · 2 comments

Comments

@abotalov
Copy link
Contributor

abotalov commented Jul 9, 2014

RFC6570 doesn't seem to have a concept of default values. But Template class has variable_defaults method so I would expect it it to work the same as here - http://msdn.microsoft.com/en-us/library/bb675245(v=vs.110).aspx (see "Default Variable Values" section)

But it doesn't work:

Addressable::Template.new('/test/{a=1}/{b=5}').variables
# => []
Addressable::Template.new('/test/{a=1}/{b=5}').variable_defaults
# => {}
@abotalov abotalov reopened this Jul 20, 2014
@abotalov
Copy link
Contributor Author

Probably variable_defaults should be removed if it doesn't work.

@sporkmonger
Copy link
Owner

/cc @therabidbanana

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants