On Sun, Apr 19, 2009 at 3:51 AM, Matt Wynne <m...@mattwynne.net> wrote:

> @order_presenter.product_titles do |product_title, url|
>  <%= link_to product_title, url %>
> end

The presentation of an order in most apps will be constructed from
additional columns (e.g., color, size, price, extended price). These
columns may well be formatted differently depending on the
circumstance (e.g, printed or on-screen).

Now, it might be a good idea to put this construction and formatting
in a helper or presenter outside the view (though it won't be
TSTTCPW). But anywhere you put it, there will be non-Demeterian code
that needs to drill down into each order's items', products'
information (as well as non-product information, such as line-item
discount). If the underlying model changes, this code will have to
change - you can't avoid it.

///ark
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to