class CvController

Public Instance Methods

create() click to toggle source

POST /cvs POST /cvs.json

# File lib/rails/generators/rorchado/templates/controllers/cv_controller.rb, line 42
def create
  @cv = Cv.new(params[:cv])

  respond_to do |format|
    if @cv.save
      format.html { redirect_to @cv, :notice => 'Cv was successfully created.' }
      format.json { render :json => @cv, :status => :created, :location => @cv }
    else
      format.html { render :action => "new" }
      format.json { render :json => @cv.errors, :status => :unprocessable_entity }
    end
  end
end
destroy() click to toggle source

DELETE /cvs/1 DELETE /cvs/1.json

# File lib/rails/generators/rorchado/templates/controllers/cv_controller.rb, line 74
def destroy
  @cv = Cv.find(params[:id])
  @cv.destroy

  respond_to do |format|
    format.html { redirect_to cvs_url }
    format.json { head :no_content }
  end
end
edit() click to toggle source

GET /cvs/1/edit

# File lib/rails/generators/rorchado/templates/controllers/cv_controller.rb, line 36
def edit
  @cv = Cv.find(params[:id])
end
index() click to toggle source

GET /cvs GET /cvs.json

# File lib/rails/generators/rorchado/templates/controllers/cv_controller.rb, line 4
def index
  @cvs = Cv.all

  respond_to do |format|
    format.html # index.html.erb
    format.json { render :json => @cvs }
  end
end
new() click to toggle source

GET /cvs/new GET /cvs/new.json

# File lib/rails/generators/rorchado/templates/controllers/cv_controller.rb, line 26
def new
  @cv = Cv.new

  respond_to do |format|
    format.html # new.html.erb
    format.json { render :json => @cv }
  end
end
show() click to toggle source

GET /cvs/1 GET /cvs/1.json

# File lib/rails/generators/rorchado/templates/controllers/cv_controller.rb, line 15
def show
  @cv = Cv.find(params[:id])

  respond_to do |format|
    format.html # show.html.erb
    format.json { render :json => @cv }
  end
end
update() click to toggle source

PUT /cvs/1 PUT /cvs/1.json

# File lib/rails/generators/rorchado/templates/controllers/cv_controller.rb, line 58
def update
  @cv = Cv.find(params[:id])

  respond_to do |format|
    if @cv.update_attributes(params[:cv])
      format.html { redirect_to @cv, :notice => 'Cv was successfully updated.' }
      format.json { head :no_content }
    else
      format.html { render :action => "edit" }
      format.json { render :json => @cv.errors, :status => :unprocessable_entity }
    end
  end
end