-
Notifications
You must be signed in to change notification settings - Fork 158
enhanced register options #4763
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
Conversation
|
p.s. there is a typo in a line unrelated to my change in ood-portal-generator line 198 |
| <%- end -%> | ||
|
|
||
| <%- if @register_uri && @register_root %> | ||
| <%- if @register_uri && @register_root && @register_method && @register_path %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised this has backward compatibility, but then again, maybe there were no test cases for the same.
It's imperative that we keep compatibility here so I'll have to pull this down and maybe write a test or two for it in a separate PR to be sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, always good to test it. I guess those do no need to be in that test at all, they both have defaults set in the view so will always be set when register_root is set.
I put them there as I didn't like using them as non-optionals in the erb template without testing they were set in the block that has them (and wrapping them all in if's made the code messy like it was in the previous PR)
the view has....
@register_path = opts.fetch(:register_path, @register_root)
@register_method = opts.fetch(:register_method, 'Alias')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a test for the default register settings
|
I think this is fine, I see how it's backward compatible still. Though I would like to get @treydock's opinion. |
|
@johrstrom Looks fine to me. |
these changes make the register url more flexible, tests included this time