category name should be scoped on site too

Ruben Fonseca committed Mar 08, 2012
commit b3fb7448aa21bdf11467c40977ac1f7fe106f8b6
Showing 1 changed file with 2 additions and 2 deletions
app/models/cms/category.rb +2 -2
@@ @@ -14,7 +14,7 @@ class Cms::Category < ActiveRecord::Base
:presence => true
validates :label,
:presence => true,
- :uniqueness => { :scope => :categorized_type }
+ :uniqueness => { :scope => [:categorized_type, :site_id] }
validates :categorized_type,
:presence => true
@@ @@ -24,4 +24,4 @@ class Cms::Category < ActiveRecord::Base
where(:categorized_type => type)
}
- end
\ No newline at end of file
+ end