43 lines
947 B
Ruby
43 lines
947 B
Ruby
class Admin::TechniqueStatusesController < OrbitMemberController
|
|
|
|
def index
|
|
end
|
|
|
|
def new
|
|
@technique_status = TechniqueStatus.new
|
|
@url = admin_technique_statuses_path
|
|
end
|
|
|
|
def edit
|
|
@technique_status = TechniqueStatus.find(params[:id])
|
|
@url = admin_technique_status_path(@technique_status)
|
|
end
|
|
|
|
def create
|
|
technique_status = TechniqueStatus.create(technique_status_params)
|
|
@technique_statuses = TechniqueStatus.all
|
|
end
|
|
|
|
def update
|
|
technique_status = TechniqueStatus.find(params[:id]) rescue nil
|
|
if !technique_status.nil?
|
|
technique_status.update_attributes(technique_status_params)
|
|
end
|
|
@technique_statuses = TechniqueStatus.all
|
|
end
|
|
|
|
def destroy
|
|
technique_status = TechniqueStatus.find(params[:id]) rescue nil
|
|
if !technique_status.nil?
|
|
technique_status.destroy
|
|
end
|
|
@technique_statuses = TechniqueStatus.all
|
|
end
|
|
|
|
private
|
|
|
|
def technique_status_params
|
|
params.require(:technique_status).permit!
|
|
end
|
|
|
|
end |