2009/10/2 SNelson <[email protected]>: > > Thanks Colin; > > Uh - I *think* that's the answer to the question I was asking. > I guess more specifically, since you gave me two options, which is > considered (current) best practice? > Or are they both about equal and it's personal choice?
If you end up with any significant logic in the view then use a separate view. Of course there is yet another possibility which is to use a different controller for the alternative view, maybe with only the index action, and accessing the same model(s) as the original controller. If you think of this as a different view of the same data then this may not be the right route, but if you think of it as a different something_you_want_to_look_at that just happens to have the same underlying data as the first view then maybe this is the way to go. If you can't decide on which way then pick on one of them and code it (don't forget to write the tests first or at least as you go), then try one of the alternatives. It should not be much work re-coding as the fundamental building blocks of the view will not change. Use a version control system to keep track of your code (I prefer git, as do most people now I think) so it is easy to backtrack to the original if you decide it is not working out nicely. You will know which solution is the best one when you get there, it will feel right. Colin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

