Skip to content

Commit

Permalink
audio recording validations, user model changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cofiem committed Oct 31, 2012
1 parent 5f5db07 commit 3eae0ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/models/audio_recording.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ class AudioRecording < ActiveRecord::Base
# validation
validates :uuid, :presence => true, :length => {:is => 36}
validates :user, :presence => true


validates :recorded_date, :presence => true, :on_or_before => :today
validates :recorded_date, :presence => true, :timeliness => {:on_or_before => lambda { Date.current }, :type => :date }
validates :site, :presence => true
validates :duration_seconds, :presence => true, :numericality => { :greater_than_or_equal_to => 0 }

Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ class User < ActiveRecord::Base
# validation
validates_presence_of :display_name
validates_uniqueness_of :display_name, :email, :case_sensitive => false
has_friendly_id :display_name, :use_slug => true, :strip_non_ascii => true
#friendly_id :display_name, :use_slug => true, :strip_non_ascii => true
end

0 comments on commit 3eae0ae

Please sign in to comment.