Wouldn't it be better if we put this Cart#paypal_url method into a helper (eg. CartsHelper). Then, we don't have to pass the return_url around.
I don't really see how generating a paypal url is the responsibility of the Cart model. And the url is only being referenced in the view anyway. I think the helper is a better place for this kind of thing.
Wouldn't it be better if we put this Cart#paypal_url method into a helper (eg. CartsHelper). Then, we don't have to pass the return_url around.
I don't really see how generating a paypal url is the responsibility of the Cart model. And the url is only being referenced in the view anyway. I think the helper is a better place for this kind of thing.