Sha256: a3fd14d82d59a0552ed1c331ba8b896ea2f4935e43726c3672cd578215e1bc13

Contents?: true

Size: 836 Bytes

Versions: 6

Compression:

Stored size: 836 Bytes

Contents

class AudiosController < ApplicationController

  respond_to :html

  # GET /audios
  def index
    @audios = Audio.all

    respond_with(@audios)
  end

  # GET /audios/1
  def show
    @audio = Audio.find(params[:id])

    respond_with(@audio)
  end

  # GET /audios/new
  def new
    @audio = Audio.new

    respond_with(@audio)
  end

  # GET /audios/1/edit
  def edit
    @audio = Audio.find(params[:id])
  
    respond_with(@audio)
  end

  # POST /audios
  def create
    @audio = Audio.create(params[:audio])

    respond_with(@audio)
  end

  # PUT /audios/1
  def update
    @audio = Audio.find(params[:id])
    @audio.attributes = params[:audio]
    @audio.save
  
    respond_with(@audio)
  end

  # DELETE /audios/1
  def destroy
    @audio = Audio.find(params[:id])
    @audio.destroy

    respond_with(@audio)
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
attached-1.0.0 test/dummy/app/controllers/audios_controller.rb
attached-0.6.0 test/dummy/app/controllers/audios_controller.rb
attached-0.5.9 test/dummy/app/controllers/audios_controller.rb
attached-0.5.8 test/dummy/app/controllers/audios_controller.rb
attached-0.5.7 test/dummy/app/controllers/audios_controller.rb
attached-0.5.6 test/dummy/app/controllers/audios_controller.rb