Sha256: 52c4730ef7e84031ab0faf14f5c518e0d259dfc8bda12bdb3093dc4c1c445706

Contents?: true

Size: 780 Bytes

Versions: 22

Compression:

Stored size: 780 Bytes

Contents

class ConcertosController < ApplicationController
  # requires that a User is logged in
  # before_filter :authenticate_user!

  expose(:concertos) { Concerto.all }
  expose(:concerto)
  
  def index
  end

  def guest
  end

  def admin
  end

  def admin_account
  end

  def show
  end

  def new
  end

  def create
    if concerto.save
      redirect_to concerto, :notice => "Successfully created concerto."
    else
      render :new
    end
  end

  def edit
  end
  
  def update
    if concerto.update_attributes(params[:concerto])
      redirect_to concerto, :notice => "Successfully updated concerto."
    else
      render :edit
    end
  end
  
  def destroy
    concerto.destroy
    redirect_to concertos_url, :notice => "Successfully destroyed concerto."
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
cantango-0.8.5.1 spec/devise-dummy/app/controllers/concertos_controller.rb
cantango-0.8.0 spec/devise-dummy/app/controllers/concertos_controller.rb