phcscriptcdn 7.0.1 → 7.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -20
  3. data/README.md +43 -43
  4. data/Rakefile +33 -33
  5. data/app/assets/config/phcscriptcdn_manifest.js +2 -2
  6. data/app/assets/javascripts/phcscriptcdn/application.js +2 -2
  7. data/app/assets/stylesheets/phcscriptcdn/application.scss +2 -2
  8. data/app/controllers/phcscriptcdn/application_controller.rb +12 -12
  9. data/app/controllers/phcscriptcdn/script/authors_controller.rb +65 -65
  10. data/app/controllers/phcscriptcdn/script/extensions_controller.rb +65 -65
  11. data/app/controllers/phcscriptcdn/script/licences_controller.rb +65 -65
  12. data/app/controllers/phcscriptcdn/script/listings_controller.rb +65 -65
  13. data/app/controllers/phcscriptcdn/script/urls_controller.rb +74 -74
  14. data/app/controllers/phcscriptcdn/script/versions_controller.rb +65 -65
  15. data/app/helpers/phcscriptcdn/application_helper.rb +14 -14
  16. data/app/jobs/phcscriptcdn/application_job.rb +4 -4
  17. data/app/models/phcscriptcdn/application_record.rb +4 -4
  18. data/app/models/phcscriptcdn/script.rb +6 -6
  19. data/app/models/phcscriptcdn/script/author.rb +20 -20
  20. data/app/models/phcscriptcdn/script/extension.rb +24 -24
  21. data/app/models/phcscriptcdn/script/licence.rb +23 -23
  22. data/app/models/phcscriptcdn/script/listing.rb +32 -32
  23. data/app/models/phcscriptcdn/script/url.rb +26 -26
  24. data/app/models/phcscriptcdn/script/version.rb +20 -20
  25. data/app/views/layouts/phcscriptcdn/application.html.erb +56 -56
  26. data/app/views/layouts/phcscriptcdn/components/backend/footer/_footer.html.erb +4 -4
  27. data/app/views/layouts/phcscriptcdn/components/backend/navigation/_navigation.html.erb +56 -56
  28. data/app/views/layouts/phcscriptcdn/components/backend/topbar/_topbar.html.erb +5 -5
  29. data/app/views/layouts/phcscriptcdn/frontend.html.erb +22 -22
  30. data/app/views/phcscriptcdn/script/authors/_form.html.erb +36 -36
  31. data/app/views/phcscriptcdn/script/authors/edit.html.erb +39 -39
  32. data/app/views/phcscriptcdn/script/authors/index.html.erb +67 -67
  33. data/app/views/phcscriptcdn/script/authors/new.html.erb +39 -39
  34. data/app/views/phcscriptcdn/script/authors/show.html.erb +42 -42
  35. data/app/views/phcscriptcdn/script/extensions/_form.html.erb +28 -28
  36. data/app/views/phcscriptcdn/script/extensions/edit.html.erb +39 -39
  37. data/app/views/phcscriptcdn/script/extensions/index.html.erb +61 -61
  38. data/app/views/phcscriptcdn/script/extensions/new.html.erb +38 -38
  39. data/app/views/phcscriptcdn/script/extensions/show.html.erb +42 -42
  40. data/app/views/phcscriptcdn/script/licences/_form.html.erb +47 -47
  41. data/app/views/phcscriptcdn/script/licences/edit.html.erb +39 -39
  42. data/app/views/phcscriptcdn/script/licences/index.html.erb +71 -71
  43. data/app/views/phcscriptcdn/script/licences/new.html.erb +39 -39
  44. data/app/views/phcscriptcdn/script/licences/show.html.erb +42 -42
  45. data/app/views/phcscriptcdn/script/listings/_form.html.erb +68 -68
  46. data/app/views/phcscriptcdn/script/listings/edit.html.erb +39 -39
  47. data/app/views/phcscriptcdn/script/listings/index.html.erb +65 -65
  48. data/app/views/phcscriptcdn/script/listings/new.html.erb +39 -39
  49. data/app/views/phcscriptcdn/script/listings/show.html.erb +40 -40
  50. data/app/views/phcscriptcdn/script/urls/_form.html.erb +36 -36
  51. data/app/views/phcscriptcdn/script/urls/edit.html.erb +39 -39
  52. data/app/views/phcscriptcdn/script/urls/index.html.erb +63 -63
  53. data/app/views/phcscriptcdn/script/urls/new.html.erb +39 -39
  54. data/app/views/phcscriptcdn/script/urls/show.html.erb +41 -41
  55. data/app/views/phcscriptcdn/script/versions/_form.html.erb +20 -20
  56. data/app/views/phcscriptcdn/script/versions/edit.html.erb +39 -39
  57. data/app/views/phcscriptcdn/script/versions/index.html.erb +59 -59
  58. data/app/views/phcscriptcdn/script/versions/new.html.erb +39 -39
  59. data/app/views/phcscriptcdn/script/versions/show.html.erb +42 -42
  60. data/config/initializers/friendly_id.rb +92 -92
  61. data/config/routes.rb +30 -30
  62. data/db/migrate/20160731205205_create_phcscriptcdn_script_extensions.rb +20 -20
  63. data/db/migrate/20160731205917_create_phcscriptcdn_script_listings.rb +35 -35
  64. data/db/migrate/20160731205954_create_phcscriptcdn_script_versions.rb +18 -18
  65. data/db/migrate/20160731210626_create_phcscriptcdn_script_urls.rb +24 -24
  66. data/db/migrate/20160731210723_create_phcscriptcdn_script_authors.rb +23 -23
  67. data/db/migrate/20160801032225_create_phcscriptcdn_script_licences.rb +27 -27
  68. data/db/migrate/20170423022446_create_friendly_id_slugs.rb +15 -15
  69. data/lib/phcscriptcdn.rb +4 -4
  70. data/lib/phcscriptcdn/engine.rb +68 -68
  71. data/lib/phcscriptcdn/version.rb +3 -3
  72. data/lib/tasks/phcscriptcdn_tasks.rake +4 -4
  73. metadata +19 -49
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e6d782f70ded1858eacf64ff8a642bcf0ec766b
4
- data.tar.gz: fa3d3df5f9956d8fcb73641cb1910006afa0630b
3
+ metadata.gz: fa8eb465e617e3b7dedbb7f0f5267c44c6320a85
4
+ data.tar.gz: bd99c17c2f6e3a066a7a52d62bf5c6c8d9f0b4f8
5
5
  SHA512:
6
- metadata.gz: d738e6de08d54d787d5afa88e1943fb23569cdbb170d6feba7a0291ff3049d7f43a5bdf23bd4f4be584e7b486d7b459508bea44e73cdaf5b5ff4d84ff1a94de9
7
- data.tar.gz: 308b14a527351420dea98839cd551cabfc78332811f14d6601c4ebd48b58748ee66c7f13ac4559fc29844e194cf544118a77a7ffe3c8e2474001e01518f94208
6
+ metadata.gz: 5653cdb04574087bd39a1092bb978b57b0e9d16014b6e9abb47abfad865b15cea81f25ab328159be4647740eb08b8ce3e27f0baa866335db3038f81c8d0dedd3
7
+ data.tar.gz: 428ddb1f928cefd1776b3b0a5507279261bea35f73f5d1b25211e8d326262419c6dd657d09967864831a9ba41bd8c18bafd7c1827dfd9360fccf1f980c5d4d80
@@ -1,20 +1,20 @@
1
- Copyright 2016-2017 BradPotts - PHCNetworks
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright 2016-2017 BradPotts - PHCNetworks
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,43 +1,43 @@
1
- [![security](https://hakiri.io/github/PHCNetworks/phc-scriptcdn/master.svg)](https://hakiri.io/github/PHCNetworks/phc-scriptcdn/master)
2
- [![Code Climate](https://codeclimate.com/github/PHCNetworks/phc-scrtipcdn/badges/gpa.svg)](https://codeclimate.com/github/PHCNetworks/phc-scrtipcdn)
3
- [![Dependency Status](https://gemnasium.com/badges/github.com/PHCNetworks/phc-scriptcdn.svg)](https://gemnasium.com/github.com/PHCNetworks/phc-scriptcdn)
4
- [![Gem Version](https://badge.fury.io/rb/phcscriptcdn.svg)](https://badge.fury.io/rb/phcscriptcdn)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/PHCNetworks/phc-scriptcdn/blob/master/MIT-LICENSE)
6
-
7
- ### PHCScriptCDN(6) (Script Listing Engine) Documentation
8
- PHCScriptCDN(6) rails script management engine for website script CDN listings.
9
-
10
- * Manage script CDN listings for websites.
11
- * Main script title and description.
12
- * Script versions and script URLs.
13
-
14
- #### Step 1 - Add PHCScriptCDN to your gemfile and run command
15
-
16
- gem 'phcscriptcdn', '~> 6.0'
17
- bundle install
18
-
19
- #### Step 2 - Copy PHCScriptCDN Database Tables
20
- To copy PHCScriptCDN's required database migrations, copy each command individually to your terminal's command line.
21
-
22
- rails phcscriptcdn:install:migrations
23
- rails db:migrate
24
-
25
- #### Step 3 - Mount PHCScriptCDN & Add Routes
26
- Mount PHCMembers by adding code below to your routes file.
27
-
28
- mount Phcscriptcdn::Engine, :at => '/'
29
-
30
- #### Step 4 - Recompile Assets
31
- To properly function re-compile your application's assets to copy over required files.
32
-
33
- rails assets:clobber
34
- rails assets:precompile
35
-
36
- #### Step 5 - Generate Contact Form View (Customization)
37
- All PHCScriptCDN views and layouts can be overwritten by copying files to your application.
38
-
39
- rails generate phcscriptcdn:views
40
-
41
- #### Additional Information
42
-
43
- - [Critical Security Updates](https://github.com/PHCNetworks/phc-scriptcdn/wiki/Critical-Security-Updates)
1
+ [![security](https://hakiri.io/github/PHCNetworks/phc-scriptcdn/master.svg)](https://hakiri.io/github/PHCNetworks/phc-scriptcdn/master)
2
+ [![Code Climate](https://codeclimate.com/github/PHCNetworks/phc-scrtipcdn/badges/gpa.svg)](https://codeclimate.com/github/PHCNetworks/phc-scrtipcdn)
3
+ [![Dependency Status](https://gemnasium.com/badges/github.com/PHCNetworks/phc-scriptcdn.svg)](https://gemnasium.com/github.com/PHCNetworks/phc-scriptcdn)
4
+ [![Gem Version](https://badge.fury.io/rb/phcscriptcdn.svg)](https://badge.fury.io/rb/phcscriptcdn)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/PHCNetworks/phc-scriptcdn/blob/master/MIT-LICENSE)
6
+
7
+ ### PHCScriptCDN(6) (Script Listing Engine) Documentation
8
+ PHCScriptCDN(6) rails script management engine for website script CDN listings.
9
+
10
+ * Manage script CDN listings for websites.
11
+ * Main script title and description.
12
+ * Script versions and script URLs.
13
+
14
+ #### Step 1 - Add PHCScriptCDN to your gemfile and run command
15
+
16
+ gem 'phcscriptcdn', '~> 6.0'
17
+ bundle install
18
+
19
+ #### Step 2 - Copy PHCScriptCDN Database Tables
20
+ To copy PHCScriptCDN's required database migrations, copy each command individually to your terminal's command line.
21
+
22
+ rails phcscriptcdn:install:migrations
23
+ rails db:migrate
24
+
25
+ #### Step 3 - Mount PHCScriptCDN & Add Routes
26
+ Mount PHCMembers by adding code below to your routes file.
27
+
28
+ mount Phcscriptcdn::Engine, :at => '/'
29
+
30
+ #### Step 4 - Recompile Assets
31
+ To properly function re-compile your application's assets to copy over required files.
32
+
33
+ rails assets:clobber
34
+ rails assets:precompile
35
+
36
+ #### Step 5 - Generate Contact Form View (Customization)
37
+ All PHCScriptCDN views and layouts can be overwritten by copying files to your application.
38
+
39
+ rails generate phcscriptcdn:views
40
+
41
+ #### Additional Information
42
+
43
+ - [Critical Security Updates](https://github.com/PHCNetworks/phc-scriptcdn/wiki/Critical-Security-Updates)
data/Rakefile CHANGED
@@ -1,33 +1,33 @@
1
- begin
2
- require 'bundler/setup'
3
-
4
- rescue LoadError
5
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
- end
7
-
8
- require 'rdoc/task'
9
-
10
- RDoc::Task.new(:rdoc) do |rdoc|
11
- rdoc.rdoc_dir = 'rdoc'
12
- rdoc.title = 'Phcscriptcdn'
13
- rdoc.options << '--line-numbers'
14
- rdoc.rdoc_files.include('README.md')
15
- rdoc.rdoc_files.include('lib/**/*.rb')
16
- end
17
-
18
- APP_RAKEFILE = File.expand_path("../spec/testapp/Rakefile", __FILE__)
19
-
20
- load 'rails/tasks/engine.rake'
21
- load 'rails/tasks/statistics.rake'
22
-
23
- require 'bundler/gem_tasks'
24
- require 'rake/testtask'
25
-
26
- Rake::TestTask.new(:test) do |t|
27
- t.libs << 'lib'
28
- t.libs << 'test'
29
- t.pattern = 'test/**/*_test.rb'
30
- t.verbose = false
31
- end
32
-
33
- task default: :test
1
+ begin
2
+ require 'bundler/setup'
3
+
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+
8
+ require 'rdoc/task'
9
+
10
+ RDoc::Task.new(:rdoc) do |rdoc|
11
+ rdoc.rdoc_dir = 'rdoc'
12
+ rdoc.title = 'Phcscriptcdn'
13
+ rdoc.options << '--line-numbers'
14
+ rdoc.rdoc_files.include('README.md')
15
+ rdoc.rdoc_files.include('lib/**/*.rb')
16
+ end
17
+
18
+ APP_RAKEFILE = File.expand_path("../spec/testapp/Rakefile", __FILE__)
19
+
20
+ load 'rails/tasks/engine.rake'
21
+ load 'rails/tasks/statistics.rake'
22
+
23
+ require 'bundler/gem_tasks'
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'lib'
28
+ t.libs << 'test'
29
+ t.pattern = 'test/**/*_test.rb'
30
+ t.verbose = false
31
+ end
32
+
33
+ task default: :test
@@ -1,2 +1,2 @@
1
- //= link_directory ../javascripts/phcscriptcdn .js
2
- //= link_directory ../stylesheets/phcscriptcdn .scss
1
+ //= link_directory ../javascripts/phcscriptcdn .js
2
+ //= link_directory ../stylesheets/phcscriptcdn .scss
@@ -1,2 +1,2 @@
1
- // Load PHCAdmin3 Javascript
2
- //= require phc_admins_main_three
1
+ // Load PHCAdmin3 Javascript
2
+ //= require phc_admins_main_three
@@ -1,2 +1,2 @@
1
- // Load PHCAdmin3 Styles
2
- @import "phc_admins_style_three";
1
+ // Load PHCAdmin3 Styles
2
+ @import "phc_admins_style_three";
@@ -1,12 +1,12 @@
1
- module Phcscriptcdn
2
- class ApplicationController < ActionController::Base
3
-
4
- # Security
5
- protect_from_forgery with: :exception
6
-
7
- # Load Helpers
8
- helper Phctitleseo::Engine.helpers
9
- helper Phcnotifi::Engine.helpers
10
-
11
- end
12
- end
1
+ module Phcscriptcdn
2
+ class ApplicationController < ActionController::Base
3
+
4
+ # Security
5
+ protect_from_forgery with: :exception
6
+
7
+ # Load Helpers
8
+ helper Phctitleseo::Engine.helpers
9
+ helper Phcnotifi::Engine.helpers
10
+
11
+ end
12
+ end
@@ -1,65 +1,65 @@
1
- require_dependency "phcscriptcdn/application_controller"
2
-
3
- module Phcscriptcdn
4
- class Script::AuthorsController < ApplicationController
5
-
6
- # Filters & Security
7
- before_action :set_script_author, only: [:show, :edit, :update, :destroy]
8
-
9
- # INDEX - Script Author
10
- def index
11
- @script_authors = Script::Author.all
12
- end
13
-
14
- # DETAILS - Script Author
15
- def show
16
- end
17
-
18
- # NEW - Script Author
19
- def new
20
- @script_author = Script::Author.new
21
- end
22
-
23
- # EDIT - Script Author
24
- def edit
25
- end
26
-
27
- # CREATE - Script Author
28
- def create
29
- @script_author = Script::Author.new(script_author_params)
30
- if @script_author.save
31
- redirect_to script_authors_url, notice: 'Author was successfully created.'
32
- else
33
- render :new
34
- end
35
- end
36
-
37
- # PATCH/PUT - Script Author
38
- def update
39
- if @script_author.update(script_author_params)
40
- redirect_to script_authors_url, notice: 'Author was successfully updated.'
41
- else
42
- render :edit
43
- end
44
- end
45
-
46
- # DELETE - Script Author
47
- def destroy
48
- @script_author.destroy
49
- redirect_to script_authors_url, notice: 'Author was successfully destroyed.'
50
- end
51
-
52
- private
53
-
54
- # Common Callbacks
55
- def set_script_author
56
- @script_author = Script::Author.find(params[:id])
57
- end
58
-
59
- # Whitelist
60
- def script_author_params
61
- params.require(:script_author).permit(:authorfirstname, :authorlastname, :authorwebsite, :authorgithub, :authortwitter, :user_id, :user_name)
62
- end
63
-
64
- end
65
- end
1
+ require_dependency "phcscriptcdn/application_controller"
2
+
3
+ module Phcscriptcdn
4
+ class Script::AuthorsController < ApplicationController
5
+
6
+ # Filters & Security
7
+ before_action :set_script_author, only: [:show, :edit, :update, :destroy]
8
+
9
+ # INDEX - Script Author
10
+ def index
11
+ @script_authors = Script::Author.all
12
+ end
13
+
14
+ # DETAILS - Script Author
15
+ def show
16
+ end
17
+
18
+ # NEW - Script Author
19
+ def new
20
+ @script_author = Script::Author.new
21
+ end
22
+
23
+ # EDIT - Script Author
24
+ def edit
25
+ end
26
+
27
+ # CREATE - Script Author
28
+ def create
29
+ @script_author = Script::Author.new(script_author_params)
30
+ if @script_author.save
31
+ redirect_to script_authors_url, notice: 'Author was successfully created.'
32
+ else
33
+ render :new
34
+ end
35
+ end
36
+
37
+ # PATCH/PUT - Script Author
38
+ def update
39
+ if @script_author.update(script_author_params)
40
+ redirect_to script_authors_url, notice: 'Author was successfully updated.'
41
+ else
42
+ render :edit
43
+ end
44
+ end
45
+
46
+ # DELETE - Script Author
47
+ def destroy
48
+ @script_author.destroy
49
+ redirect_to script_authors_url, notice: 'Author was successfully destroyed.'
50
+ end
51
+
52
+ private
53
+
54
+ # Common Callbacks
55
+ def set_script_author
56
+ @script_author = Script::Author.find(params[:id])
57
+ end
58
+
59
+ # Whitelist
60
+ def script_author_params
61
+ params.require(:script_author).permit(:authorfirstname, :authorlastname, :authorwebsite, :authorgithub, :authortwitter, :user_id, :user_name)
62
+ end
63
+
64
+ end
65
+ end
@@ -1,65 +1,65 @@
1
- require_dependency "phcscriptcdn/application_controller"
2
-
3
- module Phcscriptcdn
4
- class Script::ExtensionsController < ApplicationController
5
-
6
- # Filters & Security
7
- before_action :set_script_extension, only: [:show, :edit, :update, :destroy]
8
-
9
- # INDEX - Script Extension
10
- def index
11
- @script_extensions = Script::Extension.all
12
- end
13
-
14
- # DETAILS - Script Extension
15
- def show
16
- end
17
-
18
- # NEW - Script Extension
19
- def new
20
- @script_extension = Script::Extension.new
21
- end
22
-
23
- # EDIT - Script Extension
24
- def edit
25
- end
26
-
27
- # CREATE - Script Extension
28
- def create
29
- @script_extension = Script::Extension.new(script_extension_params)
30
- if @script_extension.save
31
- redirect_to script_extensions_url, notice: 'Extension was successfully created.'
32
- else
33
- render :new
34
- end
35
- end
36
-
37
- # PATCH/PUT - Script Extension
38
- def update
39
- if @script_extension.update(script_extension_params)
40
- redirect_to script_extensions_url, notice: 'Extension was successfully updated.'
41
- else
42
- render :edit
43
- end
44
- end
45
-
46
- # DELETE - Script Extension
47
- def destroy
48
- @script_extension.destroy
49
- redirect_to script_extensions_url, notice: 'Extension was successfully destroyed.'
50
- end
51
-
52
- private
53
-
54
- # Common Callbacks
55
- def set_script_extension
56
- @script_extension = Script::Extension.find(params[:id])
57
- end
58
-
59
- # Whitelists
60
- def script_extension_params
61
- params.require(:script_extension).permit(:scriptextensionname, :scriptextensiondes, :scriptextension, :user_id, :user_name)
62
- end
63
-
64
- end
65
- end
1
+ require_dependency "phcscriptcdn/application_controller"
2
+
3
+ module Phcscriptcdn
4
+ class Script::ExtensionsController < ApplicationController
5
+
6
+ # Filters & Security
7
+ before_action :set_script_extension, only: [:show, :edit, :update, :destroy]
8
+
9
+ # INDEX - Script Extension
10
+ def index
11
+ @script_extensions = Script::Extension.all
12
+ end
13
+
14
+ # DETAILS - Script Extension
15
+ def show
16
+ end
17
+
18
+ # NEW - Script Extension
19
+ def new
20
+ @script_extension = Script::Extension.new
21
+ end
22
+
23
+ # EDIT - Script Extension
24
+ def edit
25
+ end
26
+
27
+ # CREATE - Script Extension
28
+ def create
29
+ @script_extension = Script::Extension.new(script_extension_params)
30
+ if @script_extension.save
31
+ redirect_to script_extensions_url, notice: 'Extension was successfully created.'
32
+ else
33
+ render :new
34
+ end
35
+ end
36
+
37
+ # PATCH/PUT - Script Extension
38
+ def update
39
+ if @script_extension.update(script_extension_params)
40
+ redirect_to script_extensions_url, notice: 'Extension was successfully updated.'
41
+ else
42
+ render :edit
43
+ end
44
+ end
45
+
46
+ # DELETE - Script Extension
47
+ def destroy
48
+ @script_extension.destroy
49
+ redirect_to script_extensions_url, notice: 'Extension was successfully destroyed.'
50
+ end
51
+
52
+ private
53
+
54
+ # Common Callbacks
55
+ def set_script_extension
56
+ @script_extension = Script::Extension.find(params[:id])
57
+ end
58
+
59
+ # Whitelists
60
+ def script_extension_params
61
+ params.require(:script_extension).permit(:scriptextensionname, :scriptextensiondes, :scriptextension, :user_id, :user_name)
62
+ end
63
+
64
+ end
65
+ end