Add group description field

This commit is contained in:
James Smith committed 2025-12-11 16:45:48 +00:00
1 parent 87ca35fc65
commit 8acd5cab84
2 files changed
+6

No files matched your search

@@ -2,6 +2,7 @@ class CreateGroups < ActiveRecord::Migration[8.0]
def change
create_table :groups do |t|
t.string :name, null: false
t.text :description
t.belongs_to :creator, null: false, foreign_key: true
t.timestamps
end
+5
View File
@@ -20,4 +20,9 @@ RSpec.describe Group do
group.members << alice
expect(group.members).to include alice
end
it "can have a description" do
group = create(:group, description: "details go here")
expect(group.description).to eq "details go here"
end
end