app/models/phcscriptcdnpro/script/version.rb in phcscriptcdnpro-73.1.0 vs app/models/phcscriptcdnpro/script/version.rb in phcscriptcdnpro-74.0.0
- old
+ new
@@ -2,28 +2,25 @@
class Script::Version < ApplicationRecord
# Clean URL Initialize
extend FriendlyId
- # Add Paper Trail
+ # Paper Trail Initialize
has_paper_trail :class_name => 'Phcscriptcdnpro::ScriptversionVersions'
# Relationships
has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing', :through => :urls
has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
- # Validation for Form Fields
+ # Form Fields Validation
validates :script_version_number,
- presence: true
+ presence: true
# Clean URL Define
- friendly_id :phcscriptcdnpro_version_slug, use: [:slugged, :finders]
+ friendly_id :phc_nice_url_slug, use: [:slugged, :finders]
- # Define for Multiple Records
- def phcscriptcdnpro_version_slug
- [
- [:script_version_number]
- ]
+ def phc_nice_url_slug
+ [:script_version_number]
end
end
end