Sha256: ee7e57251306114c398ec278408c5486f9f3a571ce49e60c24b7731c1674dc6e

Contents?: true

Size: 790 Bytes

Versions: 15

Compression:

Stored size: 790 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 :extension_name,
      presence: true

    validates :extension_description,
      presence: true

    validates :extension,
      presence: true
    
    # Clean URL Define
    friendly_id :phcdev_script_extension_nice_urls, use: [:slugged, :finders]

    def phcdev_script_extension_nice_urls
      [:extension]
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
phcdevworks_scripts-5.8.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-5.7.1 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-5.7.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-5.6.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-5.5.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-5.4.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-5.3.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-5.2.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-5.1.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-5.0.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-4.1.1 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-4.1.0 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-4.0.2 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-4.0.1 app/models/phcdevworks_scripts/script/extension.rb
phcdevworks_scripts-4.0.0 app/models/phcdevworks_scripts/script/extension.rb