Todd Huss wrote:
David, I understand that components are going out, but I still think
they result in cleaner code than what you're proposing here and clean
and easy to understand code is what rails is all about isn't it?
For example I personally find:
1. Extracting the set_cart out and then mixing it in to all controllers
that need it, calling it via a before_filter, and then rendering a
partial in all views that need it
It isn't complex to use the filters...
def CartController < ApplicationController
before_filter :set_cart :only=>[:show]
def CheckoutController < ApplicationController
before_filter :set_cart :only=>[:confirm_order]