Sha256: 8474d0ef62755cea1cc80f08414cb2f2a271f60221ac236033a999c91ce46c0d

Contents?: true

Size: 619 Bytes

Versions: 1

Compression:

Stored size: 619 Bytes

Contents

# frozen_string_literal: true

# == Schema Information
#
# Table name: meta_tags
#
#  id            :integer          not null, primary key
#  name          :string(50)       not null
#  content       :text
#  is_dynamic    :boolean          default(FALSE)
#  taggable_id   :integer          not null
#  taggable_type :string(50)       not null
#  created_at    :datetime
#  updated_at    :datetime
#

class MetaTag < ::ActiveRecord::Base
  belongs_to :taggable, polymorphic: true

  validates :name, :taggable_type, :content, presence: true
  validates :name, uniqueness: { scope: [:taggable_type, :taggable_id] }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
translation_cms-0.1.5 app/models/defaults/meta_tag.rb