Permalink
Browse files

- fix sex validation

  • Loading branch information...
1 parent f3b14ab commit a2742de4936711e081de1c1efb5986ee040b85c9 @abaranov abaranov committed Jul 12, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 app/models/user.rb
View
@@ -28,7 +28,8 @@ class User < ActiveRecord::Base
has_many :teacher_lessons, through: :shares, source: :lesson, conditions: { shares: { share_type: 'teach' } }
has_many :student_lessons, through: :shares, source: :lesson, conditions: { shares: { share_type: 'study' } }
- validates_presence_of :first_name, :last_name, :sex
+ validates_presence_of :first_name, :last_name
+ validates_presence_of :sex, on: :update
VKONTAKTE_SEX_ASSOCIATIONS = {
0 => 'unknown',

0 comments on commit a2742de

Please sign in to comment.