Sha256: 0bf755ea24611614581fe7afcf09e833b1d381600b6e5cce6ef273a7526aea47

Contents?: true

Size: 799 Bytes

Versions: 9

Compression:

Stored size: 799 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

9 entries across 9 versions & 1 rubygems

Version Path
attached-0.5.5 test/dummy/app/controllers/images_controller.rb
attached-0.5.4 test/dummy/app/controllers/images_controller.rb
attached-0.5.3 test/dummy/app/controllers/images_controller.rb
attached-0.5.2 test/dummy/app/controllers/images_controller.rb
attached-0.5.1 test/dummy/app/controllers/images_controller.rb
attached-0.5.0 test/dummy/app/controllers/images_controller.rb
attached-0.4.9 test/dummy/app/controllers/images_controller.rb
attached-0.4.8 test/dummy/app/controllers/images_controller.rb
attached-0.4.7 test/dummy/app/controllers/images_controller.rb