Browse files

added todo list, updated category with instance methods

  • Loading branch information...
1 parent d82aa7b commit ac618eeac1cc783df0ea7bac0c015edbce647094 @pstuteville committed Sep 24, 2010
Showing with 19 additions and 0 deletions.
  1. +3 −0 TODOS
  2. +16 −0 lib/magento/category.rb
View
3 TODOS
@@ -0,0 +1,3 @@
+- Implement correct method signatures instead of passing *args to most api calls
+- Validation
+- Add more convenience methods to objects
View
16 lib/magento/category.rb
@@ -195,5 +195,21 @@ def update_attributes(attrs)
attrs.each_pair { |k, v| @attributes[k] = v }
self.class.update(self.id, attrs)
end
+
+ def assigned_products(*args)
+ self.class.assigned_products(self.id, *args)
+ end
+
+ def assign_product(*args)
+ self.class.assign_product(self.id, *args)
+ end
+
+ def update_product(*args)
+ self.class.update_product(self.id, *args)
+ end
+
+ def remove_product(*args)
+ self.class.remove_product(self.id, *args)
+ end
end
end

0 comments on commit ac618ee

Please sign in to comment.