test/dummy/app/controllers/clients_controller.rb in trust-0.5.1 vs test/dummy/app/controllers/clients_controller.rb in trust-0.6.0
- old
+ new
@@ -35,39 +35,28 @@
end
# GET /clients/1
# GET /clients/1.json
def show
- @client = Client.find(params[:id])
-
respond_to do |format|
format.html # show.html.erb
format.json { render json: @client }
end
end
# GET /clients/new
# GET /clients/new.json
def new
- @client = Client.new
-
respond_to do |format|
format.html # new.html.erb
format.json { render json: @client }
end
end
- # GET /clients/1/edit
- def edit
- @client = Client.find(params[:id])
- end
-
# POST /clients
# POST /clients.json
def create
- @client = Client.new(params[:client])
-
respond_to do |format|
if @client.save
format.html { redirect_to @client, notice: 'Client was successfully created.' }
format.json { render json: @client, status: :created, location: @client }
else
@@ -78,11 +67,9 @@
end
# PUT /clients/1
# PUT /clients/1.json
def update
- @client = Client.find(params[:id])
-
respond_to do |format|
if @client.update_attributes(params[:client])
format.html { redirect_to @client, notice: 'Client was successfully updated.' }
format.json { head :no_content }
else