Skip to content

Instantly share code, notes, and snippets.

@daviddavis
Last active December 15, 2015 07:19
Show Gist options
  • Select an option

  • Save daviddavis/5222835 to your computer and use it in GitHub Desktop.

Select an option

Save daviddavis/5222835 to your computer and use it in GitHub Desktop.
class ContentViewDefinitionBase < ActiveRecord::Base
belongs_to :organization, :inverse_of => :content_view_definitions
has_many :content_view_definition_products, :foreign_key => "content_view_definition_id"
has_many :products, :through => :content_view_definition_products has_many :content_view_definition_repositories, :foreign_key => "content_view_definition_id"
has_many :repositories, :through => :content_view_definition_repositories
validates :organization, :presence => true
end
nosql_def:
name: NoSQL Definition
label: NoSQL
description: No SQL in this
organization: acme_corporation
ActiveRecord::StatementInvalid: PG::Error: ERROR: column "organization" of relation "content_view_definition_bases" does not exist
LINE 1: ...efinition_bases" ("name", "label", "description", "organizat...
: INSERT INTO "content_view_definition_bases" ("name", "label", "description", "organization") VALUES ('NoSQL Definition', 'NoSQL', 'No SQL in this', 'acme_corporation')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment