Skip to content

Commit

Permalink
submission-rule-STI: hound fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
David Liu committed May 28, 2015
1 parent 9618347 commit 7193c4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/controllers/assignments_controller.rb
Expand Up @@ -235,7 +235,8 @@ def update
rescue SubmissionRule::InvalidRuleType => e
@assignment.errors.add(:base, t('assignment.error', message: e.message))
flash[:error] = t('assignment.error', message: e.message)
render :edit, id: @assignment.id and return
render :edit, id: @assignment.id
return
end

if @assignment.save
Expand Down
8 changes: 4 additions & 4 deletions app/models/submission_rule.rb
Expand Up @@ -15,10 +15,10 @@ def initialize(rule_name)
# validates_presence_of :assignment

def self.descendants
[ NoLateSubmissionRule,
PenaltyPeriodSubmissionRule,
PenaltyDecayPeriodSubmissionRule,
GracePeriodSubmissionRule ]
[NoLateSubmissionRule,
PenaltyPeriodSubmissionRule,
PenaltyDecayPeriodSubmissionRule,
GracePeriodSubmissionRule]
end

def can_collect_now?
Expand Down

0 comments on commit 7193c4c

Please sign in to comment.