Skip to content

Commit

Permalink
category name should be scoped on site too
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfonseca committed Mar 8, 2012
1 parent 75ead2c commit b3fb744
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/cms/category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -24,4 +24,4 @@ class Cms::Category < ActiveRecord::Base
where(:categorized_type => type)
}

end
end

0 comments on commit b3fb744

Please sign in to comment.