Hi,

In my views I often find myself doing:

<%= user.login %>

These get scattered all over the application. Now imagine I change the
user's login to name. What happens? It blows in my face. Sure tests can
catch it, but writing tests for that purpose is too painful.

So what kind of tips / ideas / idioms / Design Patterns / other? do you
use to truly decouple the View from the Model.

One should never access object's attributes like this in the view, and
yet we see this in almost all tutorials, books and what have you. It's
now hard for me to get rid of that bad habit, and I don't even know how.
-- 
Posted via http://www.ruby-forum.com/.

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