diff --git a/app/models/unit.rb b/app/models/unit.rb index 1960ca5..c446468 100644 --- a/app/models/unit.rb +++ b/app/models/unit.rb @@ -2,6 +2,5 @@ class Unit < ActiveRecord::Base belongs_to :project validates :project, associated: true - validates :name, presence: true validates :shortname, presence: true, uniqueness: {scope: :project_id} end diff --git a/app/views/units/_form.html.erb b/app/views/units/_form.html.erb index a8838f4..3479d6f 100644 --- a/app/views/units/_form.html.erb +++ b/app/views/units/_form.html.erb @@ -6,7 +6,7 @@
<%= f.text_field :shortname, required: true, size: 10 %>
<%= f.text_field :name, required: true, size: 40 %>
+<%= f.text_field :name, size: 40 %>