phcscriptcdnpro 4.5.10 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf8f779c0292452a24f504e0eb6b1c7a6ad6dbdb
|
4
|
+
data.tar.gz: b915d7c73ec2edde115e44b280dad0320d55429e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb8d46c17863e0c4c89b888637bd5d85fcae41ea030a7a9845236a5b0cde0a4991c1d47df30ffa539947db44aa095de8b71cfecf10f72f78cf2b2df5426a8ad2
|
7
|
+
data.tar.gz: 47cc70c1b194cf7c5f4452e5c1f01b9ae9b08875939eebd58145f165350d2bccbe8be16fe9c523582eb2f0a97771c25474ff9c0578925d300f36dbba9a1b6096
|
@@ -7,56 +7,47 @@ module Phcscriptcdnpro
|
|
7
7
|
before_action :require_user
|
8
8
|
before_action :set_script_author, only: [:show, :edit, :update, :destroy]
|
9
9
|
|
10
|
-
# INDEX - Script
|
10
|
+
# INDEX - Script Author
|
11
11
|
def index
|
12
|
-
|
13
|
-
@script_authors = script_listing.authors
|
12
|
+
@script_authors = Script::Author.all
|
14
13
|
end
|
15
14
|
|
16
|
-
#
|
15
|
+
# DETAILS - Script Author
|
17
16
|
def show
|
18
|
-
script_listing = Script::Listing.find(params[:listing_id])
|
19
|
-
@script_author = script_listing.authors.find(params[:id])
|
20
17
|
end
|
21
18
|
|
22
|
-
# NEW - Script
|
19
|
+
# NEW - Script Author
|
23
20
|
def new
|
24
|
-
|
25
|
-
@script_author = script_listing.authors.build
|
21
|
+
@script_author = Script::Author.new
|
26
22
|
end
|
27
23
|
|
28
|
-
# EDIT - Script
|
24
|
+
# EDIT - Script Author
|
29
25
|
def edit
|
30
|
-
script_listing = Script::Listing.find(params[:listing_id])
|
31
|
-
@script_author = script_listing.authors.find(params[:id])
|
32
26
|
end
|
33
27
|
|
34
|
-
#
|
28
|
+
# CREATE - Script Author
|
35
29
|
def create
|
36
|
-
@
|
37
|
-
@script_author = @script_listing.authors.create(script_author_params)
|
30
|
+
@script_author = Script::Author.new(script_author_params)
|
38
31
|
if @script_author.save
|
39
|
-
redirect_to
|
32
|
+
redirect_to script_authors_url, notice: 'Author was successfully created.'
|
40
33
|
else
|
41
34
|
render :new
|
42
35
|
end
|
43
36
|
end
|
44
37
|
|
45
|
-
# PATCH/PUT - Script
|
38
|
+
# PATCH/PUT - Script Author
|
46
39
|
def update
|
47
40
|
if @script_author.update(script_author_params)
|
48
|
-
redirect_to
|
41
|
+
redirect_to script_authors_url, notice: 'Author was successfully updated.'
|
49
42
|
else
|
50
43
|
render :edit
|
51
44
|
end
|
52
45
|
end
|
53
46
|
|
54
|
-
# DELETE - Script
|
47
|
+
# DELETE - Script Author
|
55
48
|
def destroy
|
56
|
-
@script_listing = Script::Listing.find(params[:listing_id])
|
57
|
-
@script_author = @script_listing.authors.find(params[:id])
|
58
49
|
@script_author.destroy
|
59
|
-
redirect_to
|
50
|
+
redirect_to script_authors_url, notice: 'Author was successfully destroyed.'
|
60
51
|
end
|
61
52
|
|
62
53
|
private
|