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: bb62d41b1bf3261b9e1a2fb06a7a20246a79f15a
4
- data.tar.gz: c593d703d23f5cf1611d62e48f47c73fcfe3b471
3
+ metadata.gz: cf8f779c0292452a24f504e0eb6b1c7a6ad6dbdb
4
+ data.tar.gz: b915d7c73ec2edde115e44b280dad0320d55429e
5
5
  SHA512:
6
- metadata.gz: 34fc07ff05563a9ff3a66afadfd538eecd7698eec487ae6e613ee68d806bf2a33da1bdcfb6fbcc1e9df055389128e830d17189edbff85e44ee94cacef9404508
7
- data.tar.gz: a35350fbfb26d40bf862106621f258d53f555a9d85e2b12a4467dcfd20e40aea9825e89ce24db225000b94eabb3fa3b1e821e7455331a3466d93f2d1943da4dc
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 Authors
10
+ # INDEX - Script Author
11
11
  def index
12
- script_listing = Script::Listing.find(params[:listing_id])
13
- @script_authors = script_listing.authors
12
+ @script_authors = Script::Author.all
14
13
  end
15
14
 
16
- # DETAILED PROFILE - Script Authors
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 Athors
19
+ # NEW - Script Author
23
20
  def new
24
- script_listing = Script::Listing.find(params[:listing_id])
25
- @script_author = script_listing.authors.build
21
+ @script_author = Script::Author.new
26
22
  end
27
23
 
28
- # EDIT - Script Athors
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
- # POST - Script Athors
28
+ # CREATE - Script Author
35
29
  def create
36
- @script_listing = Script::Listing.find(params[:listing_id])
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 script_listing_authors_path, notice: 'Author was successfully created.'
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 Athors
38
+ # PATCH/PUT - Script Author
46
39
  def update
47
40
  if @script_author.update(script_author_params)
48
- redirect_to script_listing_authors_path, notice: 'Author was successfully updated.'
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 Athors
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 script_listing_authors_path, notice: 'Author was successfully destroyed.'
50
+ redirect_to script_authors_url, notice: 'Author was successfully destroyed.'
60
51
  end
61
52
 
62
53
  private
@@ -1,3 +1,3 @@
1
1
  module Phcscriptcdnpro
2
- VERSION = "4.5.10"
2
+ VERSION = "4.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcscriptcdnpro
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.10
4
+ version: 4.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts