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