Skip to content

Commit 4e749ab

Browse files
committed
cleanup
1 parent a01b02d commit 4e749ab

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

app/controllers/recommendations_controller.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ def destroy
4747
# This method is used to create a new recommendation
4848
def create
4949
@recommendation = Recommendation.new(recommendation_params)
50-
#existing = Recommendation.find_by(selectionsTA: @recommendation.selectionsTA, course: @recommendation.course)
5150
# Check for duplicate (name + course)
5251
if Recommendation.exists?(selectionsTA: @recommendation.selectionsTA, name: @recommendation.name, course: @recommendation.course)
53-
#if existing
5452
@recommendation.errors.add(:base, "A recommendation already exists for this student and course.")
5553
render :new, status: :unprocessable_entity and return
5654
end

0 commit comments

Comments
 (0)