> This sounds messy. Views should be dumb data displayers, not making
> decisions about whether to redirect or not. What are you trying to
> do ?
You know what, Fred? You're absolutely right. I thought about it
over night and that's the exact conclusion I came to. If one feels a
need to re-direct from a view, that's a great big flag that he's
probably doing in the view what should be done in the controller.
A lot of bytes have been spilled over the issue of how much logic
should be put in the view. I am now coming to the conclusion that
it's a whole lot less than I had previously thought. In fact, I am
fast becoming of the opinion that it's pretty much down to none. The
reason is that, in general, logic doesn't stand alone but requires
error checking. It's the additional complexity of the error checking
that sort of pushes everything into the controller. So, hence forth
my design philosophy is going to be to keep all logic in the
controller. I'll return a hash to the view containing everything that
I need to plug into the view and that's it.
Thanks a batch for the input and confirming my thinking.
... doug
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---