You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/models/journal.rb

7 lines
227 B

class Journal < ApplicationRecord
belongs_to :user
belongs_to :issue, foreign_key: :journalized_id
has_many :journal_details, :dependent => :delete_all
scope :journal_includes, ->{includes(:user, :journal_details)}
end