class ArtworkController < ApplicationController #before_filter :login_required layout "main" def index populate_sidebar("Artwork") respond_to do |format| format.html # index.html.erb end end def show populate_sidebar("Artwork") @gallery = Gallery.find(:all, :conditions => ["id = ?", params[:id]])[0] respond_to do |format| format.html { render :partial => "show_artwork", :layout => "main" } end end def init Artwork.create() respond_to do |format| format.html { redirect_to :action => "index" } end end end