Sha256: 5c7bee7ebab8b2418fa5b37b5d3bb3ab488b036bb7bce0182300bf174c01e68e
Contents?: true
Size: 793 Bytes
Versions: 6
Compression:
Stored size: 793 Bytes
Contents
class ImagesController < ApplicationController respond_to :html # GET /images def index @images = Image.all respond_with(@images) end # GET /images/1 def show @image = Image.find(params[:id]) respond_with(@image) end # GET /images/new def new @image = Image.new respond_with(@image) end # GET /images/1/edit def edit @image = Image.find(params[:id]) respond_with(@image) end # POST /images def create @image = Image.create(params[:image]) @image.save respond_with(@image) end # PUT /images/1 def update @image = Image.find(params[:id]) respond_with(@image) end # DELETE /images/1 def destroy @image = Image.find(params[:id]) @image.destroy respond_with(@image) end end
Version data entries
6 entries across 6 versions & 1 rubygems