Calories calculation – fix

Today new Run-N-Share release (version 0.187).

I made several fixes, as You can expect. Most important was issue with calories counting – there was a real mess. First there was mixed units in display. But not only for display also for calculations. Part was for metric, and part for US standards. So results were wrong, now should be more accurate.

Calories calculations are displayed only on routes up to 50 km. For longer routes there is no such need, since they are probably not for runners, I think.

Now on pages with more than 10 routes results are displayed in packs up to ten routes, to avoid mess on display. This is long story (for another post), since I was trying to use standard Rails pagination. Well I could not force it to work properly, so I wrote ugly and hairy custom paginator. It puts too much code in template, it is not efficient but has one advantage – it works for me with AJAX requests.

Now I need to rewrite my paginator or learn why standard did not work as I was expecting. But RNS should be working as for now.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.