/ Published in: Ruby
Expand |
Embed | Plain Text
# class Cart def add_to_cart @items << current_item if current_item.passes_all_checks? end # class CartItem def passes_all_checks? self.on_sale? self.in_stock? self.available_to_customer_type? end
You need to login to post a comment.
