This is because travel_list expects a strict dictionary with both origin and destination keys present. Otherwise to_param() raises and error when it converts the dict to string.
I could add the same destination address for different origins to work around but considering that Google usage limits are calculated by element returned this doesn't seem like a viable option for me.
My suggestion would be get the coords in a matrix like how the actual api expects and then convert that into a the url. This would be really useful! I'll send a PR for this soon.
This is because travel_list expects a strict dictionary with both origin and destination keys present. Otherwise to_param() raises and error when it converts the dict to string.
I could add the same destination address for different origins to work around but considering that Google usage limits are calculated by element returned this doesn't seem like a viable option for me.
My suggestion would be get the coords in a matrix like how the actual api expects and then convert that into a the url. This would be really useful! I'll send a PR for this soon.