Require a bucket name

This commit is contained in:
Jeffrey Hardy
2024-09-30 13:03:45 -04:00
parent d916736210
commit dc60c9b1a2
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -5,4 +5,6 @@ class Bucket < ApplicationRecord
belongs_to :creator, class_name: "User", default: -> { Current.user }
has_many :bubbles, dependent: :destroy
validates_presence_of :name
end
+1 -1
View File
@@ -3,6 +3,6 @@
<h1>New Bucket</h1>
<%= form_with model: @bucket do |form| %>
<p>Name:<br><%= form.text_field :name %></p>
<p>Name:<br><%= form.text_field :name, required: true %></p>
<p><%= form.submit %>
<% end %>