Secure product_categories and add example test for other supplier resources and fix hack attempts included in test

This commit is contained in:
2012-12-06 12:21:38 +01:00
parent 382f91b1d6
commit 180b6deb4d
8 changed files with 207 additions and 8 deletions
+1
View File
@@ -12,6 +12,7 @@ class ProductCategory
validates :name, presence: true
validates :position, numericality: true
validates :supplier_id, presence: true
view :by_supplier_id_and_id, key: [:supplier_id, :_id]
def self.for_user(user, options = {})
table = options[:table]