Skip to content
Snippets Groups Projects
Commit ad2b1088 authored by pabois's avatar pabois
Browse files

import categories

parent 29af85db
No related branches found
No related tags found
No related merge requests found
......@@ -34,10 +34,13 @@ class Communication::Website::Category < ApplicationRecord
belongs_to :parent,
class_name: 'Communication::Website::Category',
optional: true
has_many :children,
class_name: 'Communication::Website::Category',
foreign_key: :parent_id,
dependent: :destroy
has_one :imported_category,
class_name: 'Communication::Website::Imported::Category',
dependent: :destroy
has_many :children,
class_name: 'Communication::Website::Category',
foreign_key: :parent_id,
dependent: :destroy
has_and_belongs_to_many :posts,
class_name: 'Communication::Website::Post',
join_table: 'communication_website_categories_posts',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment