engines/ti/app/models/ti/doc.rb in c80_yax-0.1.0.22 vs engines/ti/app/models/ti/doc.rb in c80_yax-0.1.0.23

- old
+ new

@@ -8,9 +8,15 @@ :reject_if => lambda { |attributes| !attributes.present? }, :allow_destroy => true has_and_belongs_to_many :categories + has_and_belongs_to_many :items, + class_name: 'C80Yax::Item', + foreign_key: 'item_id', + join_table: 'ti_docs_items', + association_foreign_key: 'doc_id' + validates_with DocValidator default_scope {order(:created_at => :desc)} extend FriendlyId friendly_id :title, use: :slugged \ No newline at end of file