app/models/phcscriptcdn/script/url.rb in phcscriptcdn-48.0.0 vs app/models/phcscriptcdn/script/url.rb in phcscriptcdn-49.0.0
- old
+ new
@@ -7,11 +7,11 @@
# Add Paper Trail
has_paper_trail :class_name => 'Phcscriptcdn::UrlVersions'
# Relationships
belongs_to :listing, class_name: 'Phcscriptcdn::Script::Listing'
- belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
- belongs_to :extension, class_name: 'Phcscriptcdn::Script::Extension'
+ belongs_to :version, class_name: 'Phcscriptcdn::Script::Version', optional: true
+ belongs_to :extension, class_name: 'Phcscriptcdn::Script::Extension', optional: true
# Validation for Form Fields
validates :scripturl,
presence: true