app/controllers/phcscriptcdnpro/script/extensions_controller.rb in phcscriptcdnpro-73.0.0 vs app/controllers/phcscriptcdnpro/script/extensions_controller.rb in phcscriptcdnpro-73.1.0

- old
+ new

@@ -21,12 +21,10 @@ end # NEW - Script Extension def new @script_extension = Script::Extension.new - @script_extension.user_id = current_user.id - @script_extension.org_id = current_user.org_id end # EDIT - Script Extension def edit end @@ -43,22 +41,20 @@ end end # PATCH/PUT - Script Extension def update - @script_extension.user_id = current_user.id - @script_extension.org_id = current_user.org_id if @script_extension.update(script_extension_params) redirect_to script_extensions_url, notice: 'Extension was successfully updated.' else render :edit end end # DELETE - Script Extension def destroy - @script_extension.destroy + @script_extension.destroy redirect_to script_extensions_url, notice: 'Extension was successfully destroyed.' end private @@ -67,10 +63,10 @@ @script_extension = Script::Extension.friendly.find(params[:id]) end # Whitelists def script_extension_params - params.require(:script_extension).permit(:scriptextensionname, :scriptextensiondes, :scriptextension, :slug, :user_id, :org_id, :listing_id) + params.require(:script_extension).permit(:script_extension_name, :script_extension_description, :script_extension, :slug, :user_id, :org_id) end end end