Commit 1973fb41
Changed files (1)
app
models
app/models/creation.rb
@@ -1,7 +1,7 @@
class Creation < ActiveRecord::Base
validates :name, :presence => true
belongs_to :user, :counter_cache => true
- has_and_belongs_to_many :categories, -> { where unique: true }, :join_table => 'creations_categories', :autosave => true
+ has_and_belongs_to_many :categories, :join_table => 'creations_categories', :autosave => true
has_many :photos, -> { order :created_at }, :dependent => :destroy
has_many :favorites, :dependent => :destroy
acts_as_taggable