3 ms·
Not bad for a first shot. One suggestion is to use the "fat model, skinny controller" way of thinking. It'll help clean up your code significantly. http://we
by carpal 19y ago
Not bad for a first shot. One suggestion is to use the "fat model, skinny controller" way of thinking. It'll help clean up your code significantly.
http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat...
I've pastied an example of how this approach should help.
http://rafb.net/p/P4YMM359.html http://rafb.net/p/P4YMM359.html
(Pastie.caboo.se is down now for some reason, so this is good enough for now)
Generally, the only major issue I see throughout is the repeated Fueling.find(:all) calls. Not only will that hit up the database quite a bit (Rails 2.0's query caching would help a little, but that's beside the point), but it would take up a crazy amount of memory once you get a lot of fuelings in the system.
Keep at it!