Sha256: 94d7e85ce6d1f84091ff2939f5bc2e9aa2ab2acee38f98079fae50aebc53cf64
Contents?: true
Size: 695 Bytes
Versions: 16
Compression:
Stored size: 695 Bytes
Contents
class WorksController < ApplicationController before_filter :load_artist def index @works = @artist.works end def new @work = @artist.works.build end def edit @work = @artist.works.find(params[:id]) end def create @work = @artist.works.create(params[:work]) redirect_to edit_artist_work_path(@artist, @work) end def update @work = @artist.works.find(params[:id]) @work.update_attributes(params[:work]) redirect_to edit_artist_work_path(@artist, @work) end def destroy @artist.works.find(params[:id]).destroy redirect_to artists_path end private def load_artist @artist = Artist.find(params[:artist_id]) end end
Version data entries
16 entries across 16 versions & 1 rubygems