app/controllers/phcscriptcdn/scriptcdn/scripturls_controller.rb in phcscriptcdn-0.9.2 vs app/controllers/phcscriptcdn/scriptcdn/scripturls_controller.rb in phcscriptcdn-0.9.3
- old
+ new
@@ -5,39 +5,39 @@
# Filters and Security
before_action :set_scriptcdn_scripturl, only: [:show, :edit, :update, :destroy]
# Index for Scriptcdn_script URLs
def index
- scriptcdn_scriptversion = Scriptcdn::Scriptversion.find(params[:script_id])
+ scriptcdn_scriptversion = Scriptcdn::Scriptversion.find(params[:scriptversion_id])
@scriptcdn_scripturls = scriptcdn_scriptversion.scripturls
end
# Scriptcdn_script URL Details Page
def show
- scriptcdn_scriptversion = Scriptcdn::Scriptversion.find(params[:script_id])
+ scriptcdn_scriptversion = Scriptcdn::Scriptversion.find(params[:scriptversion_id])
@scriptcdn_scripturl = scriptcdn_scriptversion.scripturls.find(params[:id])
end
# New Scriptcdn_script URL
def new
- scriptcdn_scriptversion = Scriptcdn::Scriptversion.find(params[:script_id])
+ scriptcdn_scriptversion = Scriptcdn::Scriptversion.find(params[:scriptversion_id])
@scriptcdn_scripturl = scriptcdn_scriptversion.scripturls.build
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @scriptcdn_script }
end
end
# Edit Scriptcdn_script URL
def edit
- scriptcdn_scriptversion = Scriptcdn::Scriptversion.find(params[:script_id])
+ scriptcdn_scriptversion = Scriptcdn::Scriptversion.find(params[:scriptversion_id])
@scriptcdn_scripturl = scriptcdn_scriptversion.scripturls.find(params[:id])
end
# POST Scriptcdn_script URL
def create
- @scriptcdn_scriptversion = Scriptcdn::Scriptversion.find(params[:script_id])
+ @scriptcdn_scriptversion = Scriptcdn::Scriptversion.find(params[:scriptversion_id])
@scriptcdn_scripturl = @scriptcdn_scriptversion.scripturls.create(scriptcdn_scripturl_params)
respond_to do |format|
if @scriptcdn_scripturl.save
format.html { redirect_to scriptcdn_script_scripturls_path, notice: 'Script URL was Successfully Created.' }
format.json { render action: 'show', status: :created, location: @scriptcdn_scripturl }
@@ -61,10 +61,10 @@
end
end
# Delete Scriptcdn_script URL
def destroy
- @scriptcdn_scriptversion = Scriptcdn::Scriptversion.find(params[:script_id])
+ @scriptcdn_scriptversion = Scriptcdn::Scriptversion.find(params[:scriptversion_id])
@scriptcdn_scripturl = @scriptcdn_scriptversion.scripturls.find(params[:id])
@scriptcdn_scripturl.destroy
respond_to do |format|
format.html { redirect_to scriptcdn_script_scripturls_path, notice: 'Script URL was Successfully Deleted.' }
format.json { head :no_content }
\ No newline at end of file