I just refactored a 1400 line model, now 300 lines, +30 to the controller, and 850 lines in the view. The view consists of a short preamble to three large chunks, the first for a 200 calorie serving drilldown, the next for a 100 gram drilldown, and the third block is within a loop that produces from 0 to 6 additional tabbed drilldowns for measures such as "1 cup," "1 tbsp," etc.
The first problem is that the controller instance @factor_200_calories does not seem to be passed to the view, which makes the 200 calorie tab unusable, or strangely identical to the 100 g tab, except the 200 calorie tab charts rely on the @factor_200_calories variable to make the charts from Google. The 100g data is stock, in that the values are coming directly from the db. For all other gram weights I use conversion factors (@[EMAIL PROTECTED] in the third, looping chunk (not functioning)). So the only reliable tab is the 100g tab. Off and on the 200 calorie tab works, the charts show up, and the data is (I believe) sometimes distinct from the 100g tab. I know it's a bit of a chore to look at an 800 line view, but I'm hoping that someone here has the eye to spot problems quickly in these matters. I've posted the view here: http://pastie.org/285318 The problems in production @ http://nutrograph.com - are again, the 200 calorie tab, and that the third block is not working (the @tabs aren't being delivered by the controller, nor the @factor_200_calories). Locally, the tabs work, but there are a few bugs in the 200 cals. tab that I can't pin down yet. I appreciate advice and pointers about best practices, but right now I will appreciate most attention to the puzzle over the variables in question. Thank you so much for your time. Viva Haml. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/haml?hl=en -~----------~----~----~----~------~----~------~--~---
