Units parameters should be more forgiving and allow a string #297

Closed
triemstr opened this Issue Sep 19, 2012 · 2 comments

Comments

Projects
None yet
2 participants

Hi,

I spent quite a bit of time trying to pass in:

distance_units = preferences.units  # Should be 'mi' or 'km'
Location.near(origin, 500, :units => distance_units)

only to find out I had to add a 'to_sym':

Location.near(origin, 500, :units => distance_units.to_sym)

It would be nice if :units was more forgiving and could take a string.

Owner

alexreisner commented Mar 5, 2013

Fixed by #411.

alexreisner closed this Mar 5, 2013

triemstr commented Mar 5, 2013

Thank you good sir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment