Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Assessment validations #432

Merged
merged 3 commits into from
Jul 15, 2015

Conversation

allenwq
Copy link
Member

@allenwq allenwq commented Jul 14, 2015

  1. Redo the validations of bonus_exp and bonus_cutoff_at/close_at, which is not working properly now.
  2. Add null:false constrain to as_assesment, we have a bug now that some assessments don't have the MTI child table.

@@ -13,8 +13,9 @@ class Assessment::Training < ActiveRecord::Base
attr_accessible :dependent_on, :dependent_on_attributes

validates_presence_of :title, :exp, :open_at
validates_numericality_of :bonus_exp

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer the new style validations validates :column, numericality: value over validates_numericality_of.

@allenwq allenwq changed the title Training validations Assessment validations Jul 14, 2015
allenwq pushed a commit that referenced this pull request Jul 15, 2015
@allenwq allenwq merged commit 0b238ca into Coursemology:development Jul 15, 2015
@allenwq allenwq deleted the bug/training-null-false branch July 29, 2015 16:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants