# == Schema Information # # Table name: bubbles # # id :uuid not null, primary key # color :string default("#0000ff"), not null # description :text default(""), not null # name :string not null # created_at :datetime not null # updated_at :datetime not null # owner_id :uuid not null # # Indexes # # index_bubbles_on_owner_id (owner_id) # # Foreign Keys # # fk_rails_... (owner_id => users.id) # class Bubble < ApplicationRecord validates :name, presence: true, allow_blank: false belongs_to :owner, class_name: "User" has_many :spendings end