app/models/phcscriptcdn/script/version.rb in phcscriptcdn-49.0.0 vs app/models/phcscriptcdn/script/version.rb in phcscriptcdn-50.0.0
- old
+ new
@@ -6,23 +6,23 @@
# Add Paper Trail
has_paper_trail :class_name => 'Phcscriptcdn::ScriptversionVersions'
# Relationships
- has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'
+ has_many :listings, class_name: 'Phcscriptcdn::Script::Listing', :through => :urls
has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
# Validation for Form Fields
- validates :scriptversion,
+ validates :script_version_number,
presence: true
# Clean URL Define
friendly_id :phcscriptcdn_version_slug, use: [:slugged, :finders]
# Define for Multiple Records
def phcscriptcdn_version_slug
[
- [:scriptversion]
+ [:script_version_number]
]
end
end
end