On Fri, May 1, 2009 at 8:30 AM, djolley <[email protected]> wrote:

> 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.

Hold on now -- display logic definitely belongs in the view, e.g.
<% if @things.empty? %>
some meaningful alternative message
<% else %>
<!-- display things -->

Don't throw the baby out with the bathwater... :-)

>   I'll return a hash to the view containing everything that
> I need to plug into the view and that's it.

Great, as long as you're not generating markup in your controller.

-- 
Hassan Schroeder ------------------------ [email protected]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to