spec/dummy/app/models/enrollment.rb in canvas_sync-0.21.0.beta5 vs spec/dummy/app/models/enrollment.rb in canvas_sync-0.21.0

- old
+ new

@@ -16,9 +16,13 @@ # after_process_live_event do # if user.nil? # u = User.new(canvas_id: canvas_user_id) # u.sync_from_api # end + # if course.nil? + # c = Course.new(canvas_id: canvas_course_id) + # c.sync_from_api + # end # end validates :canvas_id, uniqueness: true, presence: true belongs_to :user, primary_key: :canvas_id, foreign_key: :canvas_user_id, optional: true belongs_to :role, primary_key: :canvas_id, foreign_key: :canvas_role_id, optional: true