Added validation for fixed_date to prevent 500 on the database

constraint
pull/6827/head
Sebastian Schuster 11 years ago
parent c9243e6fd2
commit dbbf99da42
  1. 2
      app/models/cost_object.rb

@ -21,7 +21,7 @@ class CostObject < ActiveRecord::Base
url: Proc.new {|o| {:controller => 'cost_objects', :action => 'show', :id => o.id}}
validates_presence_of :subject, :project, :author, :kind
validates_presence_of :subject, :project, :author, :kind, :fixed_date
validates_length_of :subject, :maximum => 255
validates_length_of :subject, :minimum => 1

Loading…
Cancel
Save