Please sign in to comment.
Projects now validate uniqueness of their name, which makes Timesheet…
…s form a bit more usable
- Loading branch information...
Showing with 2 additions and 0 deletions.
|@@ -1,5 +1,6 @@|
|class Project < ActiveRecord::Base|
|has_many :activity_types, :dependent => :destroy|
|+ validates_uniqueness_of :name|
|accepts_nested_attributes_for :activity_types, :allow_destroy => true|