phcscriptcdnpro 2.0.0 → 2.0.1

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: ea7879d7a41127fb26c42477ebf4d2ce891503e0
4
- data.tar.gz: 30b6070989b1efad4085dcf05154060da4fc8bb6
3
+ metadata.gz: adee241723545c98c2e35de72aa259a4fa30ef9c
4
+ data.tar.gz: c73216b7dbda93b26da6961d70e331debe6e66fc
5
5
  SHA512:
6
- metadata.gz: a1ddbdbe81768caf34b0da84af93294bf37676f1008433f53573fbbedbc540803ea6ea6d5735e2c7a6c40ce3827484ba45e5b6ae778523ffe61e4264f3b9908f
7
- data.tar.gz: 900ab589c66f540940c90a7c2209df0b9814d65c5ed4fe657478260c9c238a9b8cc7ae182ccac0fc921095e8418a1081b10060f96a65a7e36cdb33083eb08878
6
+ metadata.gz: 9419e2573258e0442687df4bf172167ef98b7f2a81c4f9479187a273412e7de78fb887137c75c5aae414637b2ef5cdcf7e51644e622ddcba24ada1ebbbf47c90
7
+ data.tar.gz: b7d015c405935c720eb198fe1230d68c644c7d0df3f0a1303859d5e79d23d8eb59dfe34b4eabf339bcff5bee2ca98ce56e0cefe5dd12d9d45a4e4686450a8d3d
@@ -3,15 +3,9 @@ require_dependency "phcscriptcdnpro/application_controller"
3
3
  module Phcscriptcdnpro
4
4
  class Api::MainsController < ApplicationController
5
5
 
6
- # Only Responds to API Requests
7
- respond_to :json
8
-
9
6
  # Script List API
10
7
  def index
11
8
  @scriptcdn_mains = Scriptcdn::Main.all
12
- respond_to do |format|
13
- format.json { render :json => @scriptcdn_mains }
14
- end
15
9
  end
16
10
 
17
11
  # Script Show API
@@ -18,10 +18,6 @@ module Phcscriptcdnpro
18
18
  def new
19
19
  scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
20
20
  @scriptcdn_url = scriptcdn_main.urls.build
21
- respond_to do |format|
22
- format.html # new.html.erb
23
- format.xml { render :xml => @scriptcdn_main }
24
- end
25
21
  end
26
22
 
27
23
  # Edit Script URL
@@ -34,27 +30,19 @@ module Phcscriptcdnpro
34
30
  def create
35
31
  @scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
36
32
  @scriptcdn_url = @scriptcdn_main.urls.create(scriptcdn_url_params)
37
- respond_to do |format|
38
- if @scriptcdn_url.save
39
- format.html { redirect_to scriptcdn_main_urls_path, notice: 'Script URL was Successfully Created.' }
40
- format.json { render action: 'show', status: :created, location: @scriptcdn_url }
41
- else
42
- format.html { render action: 'new' }
43
- format.json { render json: @scriptcdn_url.errors, status: :unprocessable_entity }
44
- end
33
+ if @scriptcdn_url.save
34
+ redirect_to scriptcdn_main_urls_path, notice: 'Script URL was successfully created.'
35
+ else
36
+ render :new
45
37
  end
46
38
  end
47
39
 
48
40
  # PATCH/PUT Script URL
49
41
  def update
50
- respond_to do |format|
51
- if @scriptcdn_url.update(scriptcdn_url_params)
52
- format.html { redirect_to scriptcdn_main_urls_path, notice: 'Script URL was Successfully Updated.' }
53
- format.json { head :no_content }
54
- else
55
- format.html { render action: 'edit' }
56
- format.json { render json: @scriptcdn_url.errors, status: :unprocessable_entity }
57
- end
42
+ if @scriptcdn_url.update(scriptcdn_url_params)
43
+ redirect_to scriptcdn_main_urls_path, notice: 'Script URL was successfully updated.'
44
+ else
45
+ render :edit
58
46
  end
59
47
  end
60
48
 
@@ -63,10 +51,7 @@ module Phcscriptcdnpro
63
51
  @scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
64
52
  @scriptcdn_url = @scriptcdn_main.urls.find(params[:id])
65
53
  @scriptcdn_url.destroy
66
- respond_to do |format|
67
- format.html { redirect_to scriptcdn_main_urls_path, notice: 'Script URL was Successfully Deleted.' }
68
- format.json { head :no_content }
69
- end
54
+ redirect_to scriptcdn_main_urls_path, notice: 'Script url was successfully destroyed.'
70
55
  end
71
56
 
72
57
  private
@@ -1,3 +1,3 @@
1
1
  module Phcscriptcdnpro
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
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: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts