Sha256: 10c7d05f9438f6efdcda8c9d7bce5cfaf9aa633503d10088155eb22e8f9ea5c7

Contents?: true

Size: 689 Bytes

Versions: 4

Compression:

Stored size: 689 Bytes

Contents

module PhcdevworksScripts
  class Script::Version < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

    # Paper Trail Initialize
    has_paper_trail :class_name => 'PhcdevworksScripts::ScriptversionVersions'

    # Relationships
    has_many :listings, class_name: 'PhcdevworksScripts::Script::Listing', :through => :urls
    has_many :urls, class_name: 'PhcdevworksScripts::Script::Url'

    # Form Fields Validation
    validates :script_version_number,
      presence: true

    # Clean URL Define
    friendly_id :phcdev_script_version_nice_urls, use: [:slugged, :finders]

    def phcdev_script_version_nice_urls
      [:script_version_number]
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
phcdevworks_scripts-2.3.1 app/models/phcdevworks_scripts/script/version.rb
phcdevworks_scripts-2.3.0 app/models/phcdevworks_scripts/script/version.rb
phcdevworks_scripts-2.2.0 app/models/phcdevworks_scripts/script/version.rb
phcdevworks_scripts-2.1.1 app/models/phcdevworks_scripts/script/version.rb