app/models/phcscriptcdn/script/listing.rb in phcscriptcdn-48.0.0 vs app/models/phcscriptcdn/script/listing.rb in phcscriptcdn-49.0.0
- old
+ new
@@ -7,22 +7,12 @@
# Add Paper Trail
has_paper_trail :class_name => 'Phcscriptcdn::ListingVersions'
# Relationships
has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
- belongs_to :author, class_name: 'Phcscriptcdn::Script::Author'
- belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
- belongs_to :licence, class_name: 'Phcscriptcdn::Script::Licence'
-
- # Validation for Form Fields
- validates :scripttitle,
- presence: true
-
- validates :scriptdescription,
- presence: true
-
- validates :scriptstatus,
- presence: true
+ belongs_to :author, class_name: 'Phcscriptcdn::Script::Author', optional: true
+ belongs_to :version, class_name: 'Phcscriptcdn::Script::Version', optional: true
+ belongs_to :licence, class_name: 'Phcscriptcdn::Script::Licence', optional: true
# Clean URL Define
friendly_id :phcscriptcdn_listing_slug, use: [:slugged, :finders]
# Define for Multiple Records