Unit.name not required
This commit is contained in:
parent
b1be5e571a
commit
f9c5e6d40d
@ -2,6 +2,5 @@ class Unit < ActiveRecord::Base
|
|||||||
belongs_to :project
|
belongs_to :project
|
||||||
|
|
||||||
validates :project, associated: true
|
validates :project, associated: true
|
||||||
validates :name, presence: true
|
|
||||||
validates :shortname, presence: true, uniqueness: {scope: :project_id}
|
validates :shortname, presence: true, uniqueness: {scope: :project_id}
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<p><%= f.text_field :shortname, required: true, size: 10 %></p>
|
<p><%= f.text_field :shortname, required: true, size: 10 %></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="splitcontentright">
|
<div class="splitcontentright">
|
||||||
<p><%= f.text_field :name, required: true, size: 40 %></p>
|
<p><%= f.text_field :name, size: 40 %></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<td class="shortname"><%= u.shortname %></td>
|
<td class="shortname"><%= u.shortname %></td>
|
||||||
<td class="unitname"><%= u.name %></td>
|
<td class="unitname"><%= u.name %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= delete_link unit_path(u) %>
|
<%= delete_link unit_path(u), data: {} %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
Reference in New Issue
Block a user