phcscriptcdnpro 72.2.0 → 73.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/phcscriptcdnpro/application_controller.rb +10 -5
  3. data/app/controllers/phcscriptcdnpro/script/authors_controller.rb +3 -8
  4. data/app/controllers/phcscriptcdnpro/script/extensions_controller.rb +3 -8
  5. data/app/controllers/phcscriptcdnpro/script/licences_controller.rb +2 -7
  6. data/app/controllers/phcscriptcdnpro/script/listings_controller.rb +5 -10
  7. data/app/controllers/phcscriptcdnpro/script/urls_controller.rb +2 -7
  8. data/app/controllers/phcscriptcdnpro/script/versions_controller.rb +2 -3
  9. data/app/helpers/phcscriptcdnpro/application_helper.rb +0 -10
  10. data/app/models/phcscriptcdnpro/script/author.rb +1 -1
  11. data/app/models/phcscriptcdnpro/script/extension.rb +4 -4
  12. data/app/models/phcscriptcdnpro/script/licence.rb +3 -3
  13. data/app/models/phcscriptcdnpro/script/listing.rb +19 -2
  14. data/app/models/phcscriptcdnpro/script/url.rb +5 -5
  15. data/app/models/phcscriptcdnpro/script/version.rb +3 -3
  16. data/app/views/layouts/phcscriptcdnpro/application.html.erb +21 -22
  17. data/app/views/layouts/phcscriptcdnpro/components/backend/footer/_footer.html.erb +9 -1
  18. data/app/views/layouts/phcscriptcdnpro/components/backend/navigation/_top_menu.html.erb +0 -1
  19. data/app/views/layouts/phcscriptcdnpro/components/backend/sidebars/_side_menu.html.erb +44 -16
  20. data/app/views/phcscriptcdnpro/script/authors/_form.html.erb +13 -17
  21. data/app/views/phcscriptcdnpro/script/authors/edit.html.erb +18 -7
  22. data/app/views/phcscriptcdnpro/script/authors/index.html.erb +25 -11
  23. data/app/views/phcscriptcdnpro/script/authors/new.html.erb +18 -8
  24. data/app/views/phcscriptcdnpro/script/authors/show.html.erb +35 -42
  25. data/app/views/phcscriptcdnpro/script/extensions/_form.html.erb +11 -11
  26. data/app/views/phcscriptcdnpro/script/extensions/edit.html.erb +15 -2
  27. data/app/views/phcscriptcdnpro/script/extensions/index.html.erb +19 -4
  28. data/app/views/phcscriptcdnpro/script/extensions/new.html.erb +15 -2
  29. data/app/views/phcscriptcdnpro/script/extensions/show.html.erb +34 -41
  30. data/app/views/phcscriptcdnpro/script/licences/_form.html.erb +21 -21
  31. data/app/views/phcscriptcdnpro/script/licences/edit.html.erb +15 -2
  32. data/app/views/phcscriptcdnpro/script/licences/index.html.erb +24 -9
  33. data/app/views/phcscriptcdnpro/script/licences/new.html.erb +15 -2
  34. data/app/views/phcscriptcdnpro/script/licences/show.html.erb +34 -41
  35. data/app/views/phcscriptcdnpro/script/listings/_form.html.erb +26 -33
  36. data/app/views/phcscriptcdnpro/script/listings/edit.html.erb +13 -5
  37. data/app/views/phcscriptcdnpro/script/listings/index.html.erb +23 -10
  38. data/app/views/phcscriptcdnpro/script/listings/new.html.erb +14 -5
  39. data/app/views/phcscriptcdnpro/script/listings/show.html.erb +31 -40
  40. data/app/views/phcscriptcdnpro/script/urls/_form.html.erb +10 -10
  41. data/app/views/phcscriptcdnpro/script/urls/index.html.erb +20 -5
  42. data/app/views/phcscriptcdnpro/script/urls/new.html.erb +15 -2
  43. data/app/views/phcscriptcdnpro/script/urls/show.html.erb +34 -41
  44. data/app/views/phcscriptcdnpro/script/versions/_form.html.erb +4 -4
  45. data/app/views/phcscriptcdnpro/script/versions/edit.html.erb +15 -2
  46. data/app/views/phcscriptcdnpro/script/versions/index.html.erb +18 -3
  47. data/app/views/phcscriptcdnpro/script/versions/new.html.erb +15 -2
  48. data/app/views/phcscriptcdnpro/script/versions/show.html.erb +34 -43
  49. data/config/routes.rb +2 -2
  50. data/db/migrate/20160821183652_create_phcscriptcdnpro_script_listings.rb +10 -12
  51. data/db/migrate/20160821183714_create_phcscriptcdnpro_script_authors.rb +4 -5
  52. data/db/migrate/20160821183735_create_phcscriptcdnpro_script_extensions.rb +3 -3
  53. data/db/migrate/20160821183805_create_phcscriptcdnpro_script_licences.rb +9 -10
  54. data/db/migrate/20160821183830_create_phcscriptcdnpro_script_urls.rb +7 -7
  55. data/db/migrate/20160821183946_create_phcscriptcdnpro_script_versions.rb +1 -1
  56. data/lib/phcscriptcdnpro/version.rb +1 -1
  57. metadata +61 -103
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 435f8aaf0cf66507576a2e18f49235370e162b49f866f5a4e6c51581e16c11aa
4
- data.tar.gz: aeae3724f3024383798ea522a44891fb39613be9b2a50bbcb4c0196136c8be99
3
+ metadata.gz: 2aeafb460622321c00bee73a05baeb0c6d3913ccf23905116bb7786e5958020f
4
+ data.tar.gz: dd9482caba24597d6004cc32293b1a7708ec0771e7ac6d00929825195f7386df
5
5
  SHA512:
6
- metadata.gz: 79068fa05eebbee1a333cd99fa32524ae7319c3428ef0d0b7f0b6d32fa914057ce92bfacef5f545ddf43557cb4002ca01f48fa61146d6247bd82f4e30e6c30ee
7
- data.tar.gz: e6e27e4e7edf82e9847dd6cf8134182208d375963d0d327c86b808fc9ba315a9a94a03e08465070dc99b4b3ed47213b9f7194ff8f5039389f5335c7b8741ea32
6
+ metadata.gz: b56ff83cb90e06418572ad03414f52fb9f45ea1941685d6ff8985b5f2ffcade2aca7ff87b0918e374fe7d21e3730fdb525cd5c78f08d4107eec8269a80fc8f8d
7
+ data.tar.gz: ceab28cfb68ef4a92f02c94798e23e14a2b92ac1b3db094e97eed52db308cd9d303d79ba02ccdc91c756ce7228cedb98c2c7776d31b800504147a6c998e5afcd
@@ -1,22 +1,27 @@
1
1
  module Phcscriptcdnpro
2
2
  class ApplicationController < ActionController::Base
3
-
3
+
4
4
  # Security Filters
5
5
  protect_from_forgery with: :exception
6
-
6
+ before_action :set_default_locale
7
+
7
8
  # Load Requried Helper Files
8
9
  helper Phccorehelpers::Engine.helpers
9
10
  helper Phcmenus::Engine.helpers
10
11
  helper Phctitleseo::Engine.helpers
11
12
  helper Phcnotifi::Engine.helpers
12
13
  helper Phcaccountspro::Engine.helpers
13
-
14
+
14
15
  # Papertrail Whodunnit Username
15
16
  def user_for_paper_trail
16
17
  current_user ? current_user.username : 'Public user'
17
18
  end
18
-
19
+
19
20
  private
20
-
21
+
22
+ def set_default_locale
23
+ I18n.default_locale = :en
24
+ end
25
+
21
26
  end
22
27
  end
@@ -4,9 +4,8 @@ module Phcscriptcdnpro
4
4
  class Script::AuthorsController < ApplicationController
5
5
 
6
6
  # Include Core Helpers, Security & Action Filters
7
- include Phccorehelpers::ApplicationHelper
7
+ include Phccorehelpers::PhcpluginsproHelper
8
8
  before_action :authenticate_user!
9
- before_action :phc_accounts_pro_admin_only
10
9
  before_action :set_paper_trail_whodunnit
11
10
  before_action :set_script_author, only: [:show, :edit, :update, :destroy]
12
11
 
@@ -18,14 +17,12 @@ module Phcscriptcdnpro
18
17
  # DETAILS - Script Author
19
18
  def show
20
19
  @script_authors = Script::Author.friendly.find(params[:id])
21
- @versions = Phcscriptcdnpro::AuthorVersion.where(item_id: params[:id], item_type: 'Phcscriptcdnpro::Script::Author')
20
+ @versions = Phcscriptcdnpro::AuthorVersions.where(item_id: params[:id], item_type: 'Phcscriptcdnpro::Script::Author')
22
21
  end
23
22
 
24
23
  # NEW - Script Author
25
24
  def new
26
25
  @script_author = Script::Author.new
27
- @script_author.user_id = current_user.id
28
- @script_author.org_id = current_user.org_id
29
26
  end
30
27
 
31
28
  # EDIT - Script Author
@@ -46,8 +43,6 @@ module Phcscriptcdnpro
46
43
 
47
44
  # PATCH/PUT - Script Author
48
45
  def update
49
- @script_author.user_id = current_user.id
50
- @script_author.org_id = current_user.org_id
51
46
  if @script_author.update(script_author_params)
52
47
  redirect_to script_authors_url, notice: 'Author was successfully updated.'
53
48
  else
@@ -70,7 +65,7 @@ module Phcscriptcdnpro
70
65
 
71
66
  # Whitelist
72
67
  def script_author_params
73
- params.require(:script_author).permit(:authorfirstname, :authorlastname, :authorwebsite, :authorgithub, :authortwitter, :slug, :user_id, :org_id)
68
+ params.require(:script_author).permit(:author_first_name, :author_last_name, :author_website, :author_github, :slug, :user_id, :org_id, :listing_id)
74
69
  end
75
70
 
76
71
  end
@@ -4,9 +4,8 @@ module Phcscriptcdnpro
4
4
  class Script::ExtensionsController < ApplicationController
5
5
 
6
6
  # Include Core Helpers, Security & Action Filters
7
- include Phccorehelpers::ApplicationHelper
7
+ include Phccorehelpers::PhcpluginsproHelper
8
8
  before_action :authenticate_user!
9
- before_action :phc_accounts_pro_admin_only
10
9
  before_action :set_paper_trail_whodunnit
11
10
  before_action :set_script_extension, only: [:show, :edit, :update, :destroy]
12
11
 
@@ -24,8 +23,6 @@ module Phcscriptcdnpro
24
23
  # NEW - Script Extension
25
24
  def new
26
25
  @script_extension = Script::Extension.new
27
- @script_extension.user_id = current_user.id
28
- @script_extension.org_id = current_user.org_id
29
26
  end
30
27
 
31
28
  # EDIT - Script Extension
@@ -46,8 +43,6 @@ module Phcscriptcdnpro
46
43
 
47
44
  # PATCH/PUT - Script Extension
48
45
  def update
49
- @script_extension.user_id = current_user.id
50
- @script_extension.org_id = current_user.org_id
51
46
  if @script_extension.update(script_extension_params)
52
47
  redirect_to script_extensions_url, notice: 'Extension was successfully updated.'
53
48
  else
@@ -57,7 +52,7 @@ module Phcscriptcdnpro
57
52
 
58
53
  # DELETE - Script Extension
59
54
  def destroy
60
- @script_extension.destroy
55
+ @script_extension.destroy
61
56
  redirect_to script_extensions_url, notice: 'Extension was successfully destroyed.'
62
57
  end
63
58
 
@@ -70,7 +65,7 @@ module Phcscriptcdnpro
70
65
 
71
66
  # Whitelists
72
67
  def script_extension_params
73
- params.require(:script_extension).permit(:scriptextensionname, :scriptextensiondes, :scriptextension, :slug, :user_id, :org_id)
68
+ params.require(:script_extension).permit(:script_extension_name, :script_extension_description, :script_extension, :slug, :user_id, :org_id)
74
69
  end
75
70
 
76
71
  end
@@ -4,9 +4,8 @@ module Phcscriptcdnpro
4
4
  class Script::LicencesController < ApplicationController
5
5
 
6
6
  # Include Core Helpers, Security & Action Filters
7
- include Phccorehelpers::ApplicationHelper
7
+ include Phccorehelpers::PhcpluginsproHelper
8
8
  before_action :authenticate_user!
9
- before_action :phc_accounts_pro_admin_only
10
9
  before_action :set_paper_trail_whodunnit
11
10
  before_action :set_script_licence, only: [:show, :edit, :update, :destroy]
12
11
 
@@ -24,8 +23,6 @@ module Phcscriptcdnpro
24
23
  # NEW - Script Licences
25
24
  def new
26
25
  @script_licence = Script::Licence.new
27
- @script_licence.user_id = current_user.id
28
- @script_licence.org_id = current_user.org_id
29
26
  end
30
27
 
31
28
  # EDIT - Script Licences
@@ -46,8 +43,6 @@ module Phcscriptcdnpro
46
43
 
47
44
  # PATCH/PUT - Script Licences
48
45
  def update
49
- @script_licence.user_id = current_user.id
50
- @script_licence.org_id = current_user.org_id
51
46
  if @script_licence.update(script_licence_params)
52
47
  redirect_to script_licences_url, notice: 'Licence was successfully updated.'
53
48
  else
@@ -70,7 +65,7 @@ module Phcscriptcdnpro
70
65
 
71
66
  # Whitelists
72
67
  def script_licence_params
73
- params.require(:script_licence).permit(:lcncname, :lcncdescription, :lcncdescript, :lcnccomgpl, :lcncarvlfsf, :lcncarvlosi, :lcncarvlcopyfree, :lcncarvldebian, :lcncarvlfedora, :slug, :user_id, :org_id)
68
+ params.require(:script_licence).permit(:licence_name, :licence_description, :licence_compatible_gpl, :licence_approval_fsf, :licence_approval_osi, :licence_approval_copyfree, :licence_approval_debian, :licence_approval_fedora, :slug, :user_id, :org_id, :listing_id)
74
69
  end
75
70
 
76
71
  end
@@ -4,9 +4,8 @@ module Phcscriptcdnpro
4
4
  class Script::ListingsController < ApplicationController
5
5
 
6
6
  # Include Core Helpers, Security & Action Filters
7
- include Phccorehelpers::ApplicationHelper
7
+ include Phccorehelpers::PhcpluginsproHelper
8
8
  before_action :authenticate_user!
9
- before_action :phc_accounts_pro_admin_only
10
9
  before_action :set_paper_trail_whodunnit
11
10
  before_action :set_script_listing, only: [:show, :edit, :update, :destroy]
12
11
 
@@ -18,14 +17,12 @@ module Phcscriptcdnpro
18
17
  # DETAILS - Script Listings
19
18
  def show
20
19
  @script_listings = Script::Listing.friendly.find(params[:id])
21
- @versions = Phcscriptcdnpro::ListingVersions.where(item_id: params[:id], item_type: 'Phcscriptcdnpro::Script::Listing')
20
+ @versions = Phcscriptcdnpro::ListingVersions.where(item_id: params[:id], item_type: 'Phcscriptcdnpro::Script_::Listing')
22
21
  end
23
22
 
24
23
  # NEW - Script Listings
25
24
  def new
26
25
  @script_listing = Script::Listing.new
27
- @script_listing.user_id = current_user.id
28
- @script_listing.org_id = current_user.org_id
29
26
  end
30
27
 
31
28
  # EDIT - Script Listings
@@ -39,15 +36,13 @@ module Phcscriptcdnpro
39
36
  @script_listing.org_id = current_user.org_id
40
37
  if @script_listing.save
41
38
  redirect_to script_listings_path, notice: 'Listing was successfully created.'
42
- else
43
- render :new
39
+ else
40
+ render :new
44
41
  end
45
42
  end
46
43
 
47
44
  # PATCH/PUT - Script Listings
48
45
  def update
49
- @script_listing.user_id = current_user.id
50
- @script_listing.org_id = current_user.org_id
51
46
  if @script_listing.update(script_listing_params)
52
47
  redirect_to script_listings_path, notice: 'Listing was successfully updated.'
53
48
  else
@@ -70,7 +65,7 @@ module Phcscriptcdnpro
70
65
 
71
66
  # Whitelist
72
67
  def script_listing_params
73
- params.require(:script_listing).permit(:scripttitle, :scriptdescription, :descriptionsource, :scriptwebsite, :scripttwitter, :scriptgithub, :scriptinitialrelease, :scriptlastestrelease, :scriptbetarelease, :scriptstatus, :slug, :user_id, :org_id, :version_id, :author_id, :licence_id)
68
+ params.require(:script_listing).permit(:script_tittle, :script_description, :script_source, :script_website, :script_github, :script_initial_release, :script_lastest_release, :script_beta_release, :script_lastest_release_cdn, :script_status, :slug, :user_id, :org_id, :version_id, :author_id, :licence_id)
74
69
  end
75
70
 
76
71
  end
@@ -4,9 +4,8 @@ module Phcscriptcdnpro
4
4
  class Script::UrlsController < ApplicationController
5
5
 
6
6
  # Include Core Helpers, Security & Action Filters
7
- include Phccorehelpers::ApplicationHelper
7
+ include Phccorehelpers::PhcpluginsproHelper
8
8
  before_action :authenticate_user!
9
- before_action :phc_accounts_pro_admin_only
10
9
  before_action :set_paper_trail_whodunnit
11
10
  before_action :set_script_url, only: [:show, :edit, :update, :destroy]
12
11
 
@@ -26,8 +25,6 @@ module Phcscriptcdnpro
26
25
  def new
27
26
  script_listing = Script::Listing.find(params[:listing_id])
28
27
  @script_url = script_listing.urls.build
29
- @script_url.user_id = current_user.id
30
- @script_url.org_id = current_user.org_id
31
28
  end
32
29
 
33
30
  # EDIT - Script Athors
@@ -51,8 +48,6 @@ module Phcscriptcdnpro
51
48
 
52
49
  # PATCH/PUT - Script Athors
53
50
  def update
54
- @script_url.user_id = current_user.id
55
- @script_url.org_id = current_user.org_id
56
51
  if @script_url.update(script_url_params)
57
52
  redirect_to script_listing_urls_path, notice: 'Author was successfully updated.'
58
53
  else
@@ -77,7 +72,7 @@ module Phcscriptcdnpro
77
72
 
78
73
  # Whitelists
79
74
  def script_url_params
80
- params.require(:script_url).permit(:scripturl, :scripturlrelease, :scripturlcdnupdate, :slug, :user_id, :org_id, :listing_id, :version_id, :extension_id)
75
+ params.require(:script_url).permit(:script_url, :script_url_release, :script_url_cdn_update, :slug, :user_id, :org_id, :listing_id, :version_id, :extension_id)
81
76
  end
82
77
 
83
78
  end
@@ -4,9 +4,8 @@ module Phcscriptcdnpro
4
4
  class Script::VersionsController < ApplicationController
5
5
 
6
6
  # Include Core Helpers, Security & Action Filters
7
- include Phccorehelpers::ApplicationHelper
7
+ include Phccorehelpers::PhcpluginsproHelper
8
8
  before_action :authenticate_user!
9
- before_action :phc_accounts_pro_admin_only
10
9
  before_action :set_paper_trail_whodunnit
11
10
  before_action :set_script_version, only: [:show, :edit, :update, :destroy]
12
11
 
@@ -70,7 +69,7 @@ module Phcscriptcdnpro
70
69
 
71
70
  # Only allow a trusted parameter "white list" through.
72
71
  def script_version_params
73
- params.require(:script_version).permit(:scriptversion, :slug, :user_id, :org_id)
72
+ params.require(:script_version).permit(:script_version_number, :slug, :user_id, :org_id)
74
73
  end
75
74
 
76
75
  end
@@ -1,14 +1,4 @@
1
1
  module Phcscriptcdnpro
2
2
  module ApplicationHelper
3
-
4
- # Add Active to Menu
5
- def is_active_controller(controller_name)
6
- params[:controller] == controller_name ? "active open selected" : nil
7
- end
8
-
9
- def is_active_action(action_name)
10
- params[:action] == action_name ? "active" : nil
11
- end
12
-
13
3
  end
14
4
  end
@@ -16,7 +16,7 @@ module Phcscriptcdnpro
16
16
  # Define for Multiple Records
17
17
  def phcscriptcdnpro_author_slug
18
18
  [
19
- [:authorfirstname, :authorlastname]
19
+ [:author_first_name, :author_last_name]
20
20
  ]
21
21
  end
22
22
 
@@ -12,13 +12,13 @@ module Phcscriptcdnpro
12
12
  has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
13
13
 
14
14
  # Validation for Form Fields
15
- validates :scriptextensionname,
15
+ validates :script_extension_name,
16
16
  presence: true
17
17
 
18
- validates :scriptextensiondes,
18
+ validates :script_extension_description,
19
19
  presence: true
20
20
 
21
- validates :scriptextension,
21
+ validates :script_extension,
22
22
  presence: true
23
23
 
24
24
  # Clean URL Define
@@ -27,7 +27,7 @@ module Phcscriptcdnpro
27
27
  # Define for Multiple Records
28
28
  def phcscriptcdnpro_extentension_slug
29
29
  [
30
- [:scriptextensionname, :scriptextension]
30
+ [:script_extension]
31
31
  ]
32
32
  end
33
33
 
@@ -11,10 +11,10 @@ module Phcscriptcdnpro
11
11
  has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing'
12
12
 
13
13
  # Validation for Form Fields
14
- validates :lcncname,
14
+ validates :licence_name,
15
15
  presence: true
16
16
 
17
- validates :lcncdescript,
17
+ validates :licence_description,
18
18
  presence: true
19
19
 
20
20
  # Clean URL Define
@@ -23,7 +23,7 @@ module Phcscriptcdnpro
23
23
  # Define for Multiple Records
24
24
  def phcscriptcdnpro_licence_slug
25
25
  [
26
- [:lcncname]
26
+ [:licence_name]
27
27
  ]
28
28
  end
29
29
 
@@ -10,16 +10,33 @@ module Phcscriptcdnpro
10
10
  # Relationships
11
11
  has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
12
12
  belongs_to :author, class_name: 'Phcscriptcdnpro::Script::Author'
13
- belongs_to :version, class_name: 'Phcscriptcdnpro::Script::Version'
14
13
  belongs_to :licence, class_name: 'Phcscriptcdnpro::Script::Licence'
15
14
 
15
+ # Validation for Form Fields
16
+ validates :script_tittle,
17
+ presence: true,
18
+ length: { minimum: 3 }
19
+
20
+ validates :script_description,
21
+ presence: true,
22
+ length: { minimum: 4 }
23
+
24
+ validates :script_source,
25
+ length: { minimum: 5 }
26
+
27
+ validates :script_website,
28
+ length: { minimum: 5 }
29
+
30
+ validates :script_github,
31
+ length: { minimum: 5 }
32
+
16
33
  # Clean URL Define
17
34
  friendly_id :phcscriptcdnpro_listing_slug, use: [:slugged, :finders]
18
35
 
19
36
  # Define for Multiple Records
20
37
  def phcscriptcdnpro_listing_slug
21
38
  [
22
- [:scripttitle]
39
+ [:script_tittle, :version]
23
40
  ]
24
41
  end
25
42
 
@@ -9,17 +9,17 @@ module Phcscriptcdnpro
9
9
 
10
10
  # Relationships
11
11
  belongs_to :listing, class_name: 'Phcscriptcdnpro::Script::Listing'
12
- belongs_to :version, class_name: 'Phcscriptcdnpro::Script::Version'
13
12
  belongs_to :extension, class_name: 'Phcscriptcdnpro::Script::Extension'
13
+ belongs_to :version, class_name: 'Phcscriptcdnpro::Script::Version', optional: true
14
14
 
15
15
  # Validation for Form Fields
16
- validates :scripturl,
16
+ validates :script_url,
17
17
  presence: true
18
18
 
19
- validates :scripturlrelease,
19
+ validates :script_url_release,
20
20
  presence: true
21
21
 
22
- validates :scripturlcdnupdate,
22
+ validates :script_url_cdn_update,
23
23
  presence: true
24
24
 
25
25
  # Clean URL Define
@@ -28,7 +28,7 @@ module Phcscriptcdnpro
28
28
  # Define for Multiple Records
29
29
  def phcscriptcdnpro_url_slug
30
30
  [
31
- [:scripturl]
31
+ [:id]
32
32
  ]
33
33
  end
34
34
 
@@ -8,11 +8,11 @@ module Phcscriptcdnpro
8
8
  has_paper_trail :class_name => 'Phcscriptcdnpro::ScriptversionVersions'
9
9
 
10
10
  # Relationships
11
- has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing'
11
+ has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing', :through => :urls
12
12
  has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
13
13
 
14
14
  # Validation for Form Fields
15
- validates :scriptversion,
15
+ validates :script_version_number,
16
16
  presence: true
17
17
 
18
18
  # Clean URL Define
@@ -21,7 +21,7 @@ module Phcscriptcdnpro
21
21
  # Define for Multiple Records
22
22
  def phcscriptcdnpro_version_slug
23
23
  [
24
- [:scriptversion]
24
+ [:script_version_number]
25
25
  ]
26
26
  end
27
27