app/models/phcscriptcdn/script/listing.rb in phcscriptcdn-7.0.1 vs app/models/phcscriptcdn/script/listing.rb in phcscriptcdn-7.1.0
- old
+ new
@@ -1,33 +1,33 @@
-module Phcscriptcdn
- class Script::Listing < ApplicationRecord
-
- # Clean URLS
- extend FriendlyId
-
- # Attach to URL (Nested)
- has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
-
- # Attach to Author (None Nested)
- belongs_to :author, class_name: 'Phcscriptcdn::Script::Author'
-
- # Attach to Version (None Nested)
- belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
-
- # Attach to Licence (None Nested)
- belongs_to :licence, class_name: 'Phcscriptcdn::Script::Licence'
-
- # Validation for Form Fields
- validates :scripttitle,
- presence: true
-
- validates :scriptdescription,
- presence: true
-
- validates :scriptstatus,
- presence: true
-
- # Clean URLS Slugs
- friendly_id :scripttitle, use: :slugged
-
- end
+module Phcscriptcdn
+ class Script::Listing < ApplicationRecord
+
+ # Clean URLS
+ extend FriendlyId
+
+ # Attach to URL (Nested)
+ has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
+
+ # Attach to Author (None Nested)
+ belongs_to :author, class_name: 'Phcscriptcdn::Script::Author'
+
+ # Attach to Version (None Nested)
+ belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
+
+ # Attach to Licence (None Nested)
+ belongs_to :licence, class_name: 'Phcscriptcdn::Script::Licence'
+
+ # Validation for Form Fields
+ validates :scripttitle,
+ presence: true
+
+ validates :scriptdescription,
+ presence: true
+
+ validates :scriptstatus,
+ presence: true
+
+ # Clean URLS Slugs
+ friendly_id :scripttitle, use: :slugged
+
+ end
end
\ No newline at end of file