Skip to content

Instantly share code, notes, and snippets.

@Hasstrup
Created November 5, 2024 21:13
Show Gist options
  • Save Hasstrup/dbf04ca6a2deeac00540fe5765d7191e to your computer and use it in GitHub Desktop.
Save Hasstrup/dbf04ca6a2deeac00540fe5765d7191e to your computer and use it in GitHub Desktop.
class Templates::Template < ApplicationRecord
self.table_name = 'templates_templates'
belongs_to :user
has_many :components, class_name: 'Templates::Component'
end
# == Schema Information
#
# Table name: templates_templates
#
# id :bigint not null, primary key
# html_content :text
# instructions :jsonb
# metadata :jsonb
# reference_file_name :string
# reference_file_path :string
# title :string not null
# created_at :datetime not null
# updated_at :datetime not null
# user_id :bigint
#
# Indexes
#
# index_templates_templates_on_user_id (user_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment