Created
September 11, 2008 16:36
-
-
Save redsquirrel/10252 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bad old stuff | |
class KDOrders < ActiveRecord::Base | |
belongs_2 :cart | |
end | |
class Cart < ActiveRecord::Base | |
set_primary_key "cart_id" | |
can_haz :cart_items | |
end | |
class CartItem < ActiveRecord::Base | |
set_primary_key "cart_item_id" | |
has_wan :kd_order_item, :class_name => "KDOrderItem" | |
end | |
class KDOrderItem < ActiveRecord::Base | |
end | |
# New hotness | |
class KDCart < ActiveRecord::Base set_primary_key "cart_id" can_haz :kd_cart_items, :class_name => "KDCartItem", :foreign_key => "cart_id" | |
end | |
class KDCartItem < ActiveRecord::Base | |
set_primary_key "cart_item_id" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment