dependent to destroy
This commit is contained in:
parent
02e905b630
commit
98734d9e2d
|
@ -12,7 +12,7 @@ class Banner
|
|||
field :width, type: Integer
|
||||
field :base_image, type: Integer, default: 1
|
||||
|
||||
has_many :ad_images , dependent: :delete
|
||||
has_many :ad_images , dependent: :destroy
|
||||
|
||||
validates_uniqueness_of :title
|
||||
validates :title, :length => { :minimum => 2 }
|
||||
|
|
Loading…
Reference in New Issue