Sha256: a52d21b9221248ba143b38e2fff033e28d972794defc7da981850a1cd9481e7c

Contents?: true

Size: 800 Bytes

Versions: 12

Compression:

Stored size: 800 Bytes

Contents

module PhcdevworksScripts
  class Script::Extension < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

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

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

    # Form Fields Validation
    validates :script_extension_name,
      presence: true

    validates :script_extension_description,
      presence: true

    validates :script_extension,
      presence: true

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

    def script_extension_nice_urls
      [:script_extension]
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
phcdevworks_scripts-8.1.1 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-8.1.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-8.0.5 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-8.0.4 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-8.0.3 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-8.0.2 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-8.0.1 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-8.0.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-7.4.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-7.2.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-7.1.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-7.0.0 app/models/phcdevworks_scripts/script/extension.rb