You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/app/controllers/apply_project_masters_contr...

84 lines
2.5 KiB

class ApplyProjectMastersController < ApplicationController
# GET /apply_project_masters
# GET /apply_project_masters.json
def index
@apply_project_masters = ApplyProjectMaster.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @apply_project_masters }
end
end
# GET /apply_project_masters/1
# GET /apply_project_masters/1.json
def show
@apply_project_master = ApplyProjectMaster.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @apply_project_master }
end
end
# GET /apply_project_masters/new
# GET /apply_project_masters/new.json
def new
@apply_project_master = ApplyProjectMaster.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @apply_project_master }
end
end
# GET /apply_project_masters/1/edit
def edit
@apply_project_master = ApplyProjectMaster.find(params[:id])
end
# POST /apply_project_masters
# POST /apply_project_masters.json
def create
@apply_project_master = ApplyProjectMaster.new(params[:apply_project_master])
respond_to do |format|
if @apply_project_master.save
format.html { redirect_to @apply_project_master, notice: 'Apply project master was successfully created.' }
format.json { render json: @apply_project_master, status: :created, location: @apply_project_master }
else
format.html { render action: "new" }
format.json { render json: @apply_project_master.errors, status: :unprocessable_entity }
end
end
end
# PUT /apply_project_masters/1
# PUT /apply_project_masters/1.json
def update
@apply_project_master = ApplyProjectMaster.find(params[:id])
respond_to do |format|
if @apply_project_master.update_attributes(params[:apply_project_master])
format.html { redirect_to @apply_project_master, notice: 'Apply project master was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @apply_project_master.errors, status: :unprocessable_entity }
end
end
end
# DELETE /apply_project_masters/1
# DELETE /apply_project_masters/1.json
def destroy
@apply_project_master = ApplyProjectMaster.find(params[:id])
@apply_project_master.destroy
respond_to do |format|
format.html { redirect_to apply_project_masters_url }
format.json { head :no_content }
end
end
end