rails-inspired calculations for backbone