Tag has_many taggings, and delete them on destroy
This commit is contained in:
parent
04218c8f6c
commit
0ff4ef2484
|
@ -1,4 +1,7 @@
|
||||||
class Tag < ActiveRecord::Base
|
class Tag < ActiveRecord::Base
|
||||||
|
has_many :taggings,
|
||||||
|
:dependent => :delete_all
|
||||||
|
|
||||||
attr_accessor :filtered_count
|
attr_accessor :filtered_count
|
||||||
|
|
||||||
scope :accessible_to, ->(user) do
|
scope :accessible_to, ->(user) do
|
||||||
|
|
Loading…
Reference in a new issue