osem-fcy/spec/factories/comments.rb

34 lines
833 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2021-02-20 09:57:27 -08:00
# == Schema Information
#
# Table name: comments
#
# id :bigint not null, primary key
# body :text
# commentable_type :string
# lft :integer
# rgt :integer
# subject :string
# title :string(50) default("")
# created_at :datetime
# updated_at :datetime
# commentable_id :integer
# parent_id :integer
# user_id :integer
#
# Indexes
#
# index_comments_on_commentable_id (commentable_id)
# index_comments_on_commentable_type (commentable_type)
# index_comments_on_user_id (user_id)
#
2015-08-25 14:41:09 +02:00
FactoryBot.define do
2015-08-25 14:41:09 +02:00
factory :comment do
body { 'Most interresting comment ever, created by a girl.' }
2015-08-25 14:41:09 +02:00
user
association :commentable, factory: :event
end
end