Sha256: b76a33645d9472578a5a864408d3845104fc383040b880afe18141d97174be9f

Contents?: true

Size: 696 Bytes

Versions: 4

Compression:

Stored size: 696 Bytes

Contents

module Phcscriptcdn
  class Script::Listing < ApplicationRecord

    # Relationships

    # Attach to URL (Nested)
    has_many :urls, class_name: 'Phcscriptcdn::Script::Url'

    # Attach to Author (None Nested)
    belongs_to :author, class_name: 'Phcscriptcdn::Script::Author'

    # Attach to Version (None Nested)
    belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'

    # Attach to Licence (None Nested)
    belongs_to :licence, class_name: 'Phcscriptcdn::Script::Licence'

    # Validation for Form Fields
    validates :scripttitle,
      presence: true

    validates :scriptdescription,
      presence: true

    validates :scriptstatus,
      presence: true

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
phcscriptcdn-5.1.2 app/models/phcscriptcdn/script/listing.rb
phcscriptcdn-5.1.1 app/models/phcscriptcdn/script/listing.rb
phcscriptcdn-5.1.0 app/models/phcscriptcdn/script/listing.rb
phcscriptcdn-5.0.1 app/models/phcscriptcdn/script/listing.rb