59 lines
1.5 KiB
Ruby
59 lines
1.5 KiB
Ruby
class VideolistingsController < ApplicationController
|
|
before_action :set_videolisting, only: [:show, :edit, :update, :destroy]
|
|
|
|
# GET /videolistings
|
|
def index
|
|
@videolistings = Videolisting.all
|
|
end
|
|
|
|
# GET /videolistings/1
|
|
def show
|
|
end
|
|
|
|
# GET /videolistings/new
|
|
def new
|
|
@videolisting = Videolisting.new
|
|
end
|
|
|
|
# GET /videolistings/1/edit
|
|
def edit
|
|
end
|
|
|
|
# POST /videolistings
|
|
def create
|
|
@videolisting = Videolisting.new(videolisting_params)
|
|
|
|
if @videolisting.save
|
|
redirect_to @videolisting, notice: 'Videolisting was successfully created.'
|
|
else
|
|
render action: 'new'
|
|
end
|
|
end
|
|
|
|
# PATCH/PUT /videolistings/1
|
|
def update
|
|
if @videolisting.update(videolisting_params)
|
|
redirect_to @videolisting, notice: 'Videolisting was successfully updated.'
|
|
else
|
|
render action: 'edit'
|
|
end
|
|
end
|
|
|
|
# DELETE /videolistings/1
|
|
def destroy
|
|
@videolisting.destroy
|
|
redirect_to videolistings_url, notice: 'Videolisting was successfully destroyed.'
|
|
end
|
|
|
|
private
|
|
# Use callbacks to share common setup or constraints between actions.
|
|
def set_videolisting
|
|
@videolisting = Videolisting.find(params[:id])
|
|
end
|
|
|
|
# Only allow a trusted parameter "white list" through.
|
|
def videolisting_params
|
|
params.require(:videolisting).permit(:videocode, :producttypeid, :remoteassetsarchive, :voiceoverselection, :musicselection, :clientprovidedscript, :keywords, :focus, :notes, :asseturls)
|
|
end
|
|
end
|