Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DriversController < ApplicationController
- before_filter :authenticate_driver!
- def index
- end
- # GET /drivers/1/edit
- def edit
- @driver = Driver.find params[:id]
- end
- # PUT /drivers/1
- # PUT /drivers/1.json
- def update
- @driver = Driver.find(params[:id])
- respond_to do |format|
- if @driver.update_attributes(params[:driver])
- format.html { redirect_to @driver, notice: 'Driver was successfully updated.' }
- format.json { head :no_content }
- else
- format.html { render action: "edit" }
- format.json { render json: @driver.errors, status: :unprocessable_entity }
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment