Conversation
This will now resolve url values prefixed with a forward-slash as relative to the url of the jasonette json they are included in. This works for urls used for mixins as well as images.
|
Thanks for the PR! I will think about this for a bit. I do realize its usefulness (I read your comment on another thread where you explain why you need it) and just trying to think about the iOS side and if this may introduce any unexpected side effects in the future. Like I mentioned in the other thread, I am just being cautious because I keep running into cases where some new feature I added innocently because it was so simple came back to bite with side effects, so just want to make sure even though it sounds harmless at first sight. I'll keep you posted. |
|
@gliechtenstein Thanks. Yes definitely this is a fairly big change so I can understand the caution. The reason I worked on this as a top-priority was as soon as I tried to use mixins I found it almost impossible as I need to move around diff environments and having to hardcode the urls makes that very difficult. An alternative could be to include a "base url" property in the head? But for now this lets me progress my app dev, so I'll just keep forward-porting this branch. |
Implement relative urls in jasonette
This will now resolve url values prefixed with a forward-slash as relative to the url of the jasonette json they are included in.
This works for urls used for mixins as well as images and other uses or urls within Jasonette JSON.
Also included are improvements to error logging to help debug this work and help with future debugging.
This is a reworking of the original PR (#35) by @brad
Fixes: #151