Create Relationable concern
This commit is contained in:
7
app/models/concerns/relationable.rb
Normal file
7
app/models/concerns/relationable.rb
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
module Relationable
|
||||||
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
|
included do
|
||||||
|
has_many :related_contents, as: :parent_relationable
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user