Sha256: a10ae5cb993c001dbc55bccc339b068464aa7ad233993686ef00e9cbf9a029de
Contents?: true
Size: 1.42 KB
Versions: 18
Compression:
Stored size: 1.42 KB
Contents
require_dependency "phcscriptcdnpro/application_controller" module Phcscriptcdnpro class Scriptcdn::MainsController < ApplicationController # Security & Action Filters before_action :require_user layout '/layouts/phcscriptcdnpro/application.html.erb' before_action :set_scriptcdn_main, only: [:show, :edit, :update, :destroy] # Script CDN Backend Index def index @scriptcdn_mains = Scriptcdn::Main.all end # Script CDN Backend Profile def show end # New Script Listing def new @scriptcdn_main = Scriptcdn::Main.new end # Edit Script Listing def edit end # POST Script CDN def create @scriptcdn_main = Scriptcdn::Main.new(scriptcdn_main_params) if @scriptcdn_main.save redirect_to @scriptcdn_main, notice: 'Script was successfully created.' else render :new end end # PATCH/PUT Script def update if @scriptcdn_main.update(scriptcdn_main_params) redirect_to @scriptcdn_main, notice: 'Script was successfully updated.' else render :edit end end # DELETE Script def destroy @scriptcdn_main.destroy redirect_to scriptcdn_mains_url, notice: 'Main was successfully destroyed.' end private # Common Callbacks def set_scriptcdn_main @scriptcdn_main = Scriptcdn::Main.find(params[:id]) end # Whitelist def scriptcdn_main_params params.require(:scriptcdn_main).permit(:scriptname, :scriptdescription, :version_id) end end end
Version data entries
18 entries across 18 versions & 1 rubygems