class UserStats < Netzke::Base def body_content(user) bike = user.bike completed = user.completed_build_bikes #TODO I think it's time to switch to a template body = "" body += %Q(
Username: #{user.username}
Total Credits Earned: #{user.total_earned_credits}
Credits Available: #{user.total_credits}
Credits Spent: #{user.total_credits_spent}
Total Hours Worked: #{user.total_hours}
Hours worked in #{Time.now.strftime('%B')}: #{user.current_month_hours}
Current bike Shop ID: #{bike.shop_id if bike}
Current bike S/N: #{bike.serial_number if bike}
) unless completed.empty? body += %Q(Previously built bikes (#{completed.count}):
) body += %Q(