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.
pgfqe6ch8/app/models/exercise_bank.rb

11 lines
437 B

6 years ago
class ExerciseBank < ActiveRecord::Base
belongs_to :user
belongs_to :course_list
has_many :exercise_bank_questions, :dependent => :destroy, :order => "#{ExerciseBankQuestion.table_name}.question_number"
attr_accessible :container_id, :container_type, :description, :is_public, :name, :quotes, :user_id, :course_list_id, :created_at, :updated_at
def course_list_name
self.course_list ? self.course_list.name : ""
end
end